3 ms·
That's valid javascript, and it would produce what you expect, with or without the ending semicolon. Here is an example: http://jsbin.com/mokipigeqa/edit?html,
by Sacho 10y ago
That's valid javascript, and it would produce what you expect, with or without the ending semicolon.
Here is an example: http://jsbin.com/mokipigeqa/edit?html,js,console http://jsbin.com/mokipigeqa/edit?html,js,console
Here are the ASI-relevant parts of the ES5 standard: http://es5.github.io/#x7.9 http://es5.github.io/#x7.9
In JavaScript, LineTerminators are used as a separator between tokens, just like other whitespace is. Therefore:
list .map() .filter()
is equivalent to
list
.map()
.filter()