Skip to content

a problem : undefined#463

Open
powy1993 wants to merge 1 commit intothebird:masterfrom
powy1993:patch-2
Open

a problem : undefined#463
powy1993 wants to merge 1 commit intothebird:masterfrom
powy1993:patch-2

Conversation

@powy1993
Copy link
Copy Markdown

var swipe=(function(me){
var test = 1;
var undefined = 1;
// compare following situations:
me.test1 = (test !== undefined); //false
me.test2 = (typeof test !== 'undefine'); // true
return me;
}(swipe||{})
);
alert(swipe.test1);
alert(swipe.test2);

var swipe=(function(me){
   var test = 1;
   var undefined = 1;
// compare following situations:
   me.test1 = (test !== undefined);  //false
   me.test2 = (typeof test !== 'undefined');   // true
   return me;
   }(swipe||{})
);
alert(swipe.test1);
alert(swipe.test2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant