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
3 == "03" // true! |
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
(true + 1) === 2; // true | |
(true + true) === 2; // true | |
true === 2; // false | |
true === 1; // false |
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 a = 8; | |
var someFunc = function(){ | |
document.write(a); | |
var a = 8; | |
}; | |
someFunc(); // writes a as undefined |
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
3 > 2 > 1 // false |
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
a = 012 // 10 |
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
"0" && {} // true | |
0 && {} // false, ok...fair enough | |
0 == "0" // true, wtf! |
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
window.window == window // true | |
window.window === window // false | |
window == document // true. wtf! |
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
window.recurse = function(times) | |
{ | |
if (times !== 0) | |
recurse(times - 1); | |
} | |
recurse(13); // stack overlfow at: 0 |
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
Number.MAX_VALUE*1.0000000000000001 === (1/0) // false | |
Number.MAX_VALUE*1.0000000000000002 === (1/0) // true |
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
Here's an example of how I was able to use the rsp from Smart.app to run on a different | |
port at the same time. It would be nice if this ability was built into the GUI app, but | |
for now, I hacked it. | |
I made a directory for my app here: | |
/Users/jim/joyent/rsp/local-smartasks | |
I put the application source in a subdirectory called '127.0.0.1'. So the bootstrap.js is | |
at /Users/jim/joyent/rsp/local-smartasks/127.0.0.1/js/bootstrap.js |