Created
October 28, 2010 07:41
-
-
Save addywaddy/650855 to your computer and use it in GitHub Desktop.
Sometimes semi-colons are indeed necessary in Javascript
This file contains 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
function echo (str) { | |
return str | |
} | |
echo("Hello") | |
(function() { | |
echo("Goodbye") | |
}) | |
// => "TypeError: string is not a function" | |
function echo (str) { | |
return str | |
} | |
echo("Hello"); | |
(function() { | |
echo("Goodbye") | |
}) | |
// => "You may proceed" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment