Last active
October 20, 2017 16:23
-
-
Save piratefsh/b9da7850c7b21f6d7d5a to your computer and use it in GitHub Desktop.
Revisions
-
Sher Minn Chong revised this gist
Feb 15, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -36,10 +36,10 @@ JavaScript can be mysterious and weird, let's just all admit that. In this talk, ## And finally, why JavaScript, whyyyy? > null == true false > null == false false // wtf? Bring your laptop for fun play-along, or just kick back and relax. Feel free to bring along your favourite JavaScript problems and we'll work on them! -
Sher Minn Chong revised this gist
Feb 15, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -42,6 +42,6 @@ JavaScript can be mysterious and weird, let's just all admit that. In this talk, > NaN == false false // wtf? Bring your laptop for fun play-along, or just kick back and relax. Feel free to bring along your favourite JavaScript problems and we'll work on them! p/s: Required watching for more fun JavaScript weirdness: https://www.destroyallsoftware.com/talks/wat -
Sher Minn Chong revised this gist
Feb 15, 2016 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # JavaScript, the weird parts JavaScript can be mysterious and weird, let's just all admit that. In this talk, we'll explore all the wonderful obscure, weird bits of JavaScript, and how to befriend them so they don't bite you in the ass (if they haven't already). For example we'll explore things like: ## Why on earth does this work: @@ -42,8 +42,6 @@ JavaScript can be mysterious and weird, let's just all admit that. > NaN == false false // wtf? Bring your laptop for fun play-along, or just kick back and relax. p/s: Required watching for more fun JavaScript weirdness: https://www.destroyallsoftware.com/talks/wat -
Sher Minn Chong revised this gist
Feb 15, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -32,7 +32,7 @@ JavaScript can be mysterious and weird, let's just all admit that. // expected 0, 1, 2, 3 // but outputs 4, 4, 4, 4??? ## What the heck is a 'prototype', anyway? ## And finally, why JavaScript, whyyyy? -
Sher Minn Chong revised this gist
Feb 15, 2016 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ JavaScript can be mysterious and weird, let's just all admit that. ## Why on earth does this work: foo(); @@ -19,9 +19,9 @@ Why on earth does this work: } ## Why is my 'this' object all wrong when my callback runs? ## This probably doesn't do what you want it to: for(var i = 0; i < 4; i++){ setTimeout(function(){ @@ -34,7 +34,7 @@ This probably doesn't do what you want it to: What the heck is a 'prototype', anyway? ## And finally, why JavaScript, whyyyy? > NaN == true false -
Sher Minn Chong revised this gist
Feb 15, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -22,6 +22,7 @@ Why on earth does this work: Why is my 'this' object all wrong when my callback runs? This probably doesn't do what you want it to: for(var i = 0; i < 4; i++){ setTimeout(function(){ console.log(i); -
Sher Minn Chong created this gist
Feb 15, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,48 @@ # JavaScript, the weird parts JavaScript can be mysterious and weird, let's just all admit that. Why on earth does this work: foo(); function foo(){ console.log('foo'); } ...but this doesn't? foo(); // throws TypeError: foo is not a function var foo = function(){ console.log('foo'); } Why is my 'this' object all wrong when my callback runs? This probably doesn't do what you want it to: for(var i = 0; i < 4; i++){ setTimeout(function(){ console.log(i); }, 0) } // expected 0, 1, 2, 3 // but outputs 4, 4, 4, 4??? What the heck is a 'prototype', anyway? And finally, why JavaScript, whyyyy? > NaN == true false > NaN == false false // wtf? In this talk, we'll explore all the wonderful obscure, weird bits of JavaScript, and how to befriend them so they don't bite you in the ass (if they haven't already). Bring your laptop for fun play-along, or just kick back and relax. p/s: Required watching for more fun JavaScript weirdness: https://www.destroyallsoftware.com/talks/wat