-
-
Save lushchick/5016434 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = '/x/'; | |
/x/==x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var calls = 0; | |
function x() { | |
return (++calls % 6) > 0 ? x : true; | |
}; | |
x() === x()() === x()()() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = { | |
n: 0, | |
valueOf: function() { | |
return ++this.n % 2 ? 3 : 1; | |
} | |
} | |
x > 2 && x < 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fn = function() { | |
this.a = 'qwe'; | |
}; | |
fn.prototype.a = true; | |
var x = new fn(); | |
delete x.a && x.a; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = { | |
foo: 'foo', | |
toString: function() { | |
return 'foo'; | |
} | |
} | |
x[x]==x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = function() { | |
x = 'p'; | |
} | |
typeof new x < typeof x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = { | |
n: 0, | |
valueOf: function() { | |
return (++this.n % 2) ? 1 : -1; | |
} | |
} | |
x - 1 === x + 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment