-
Notifications
You must be signed in to change notification settings - Fork 140
Open
Description
function yellIt(string) {
string = string.toUpperCase()
return makeMoreExciting(string)
}
That code has no semicolons. Well, it usually works, but not always:
a = 1 + 2
(3 + 4).toString()
Here is another (beautiful) example of that:
var a=3,b=3
[a,b]=[a*a,b*b]
console.log([a,b])
Another example:
x = 1 + 2
-1..toString()
Sources:
http://mislav.net/2010/05/semicolons/
http://codegolf.stackexchange.com/a/48438/33160
I would suggest simply adding semicolons at the end of every statement. (Or, you could add a semicolon when they are needed. Though, explaining that would be more work and most likely would cause more screw ups)
Metadata
Metadata
Assignees
Labels
No labels