by jQueryIsAwesome · 14y ago · 0 comments
In another note, the article says that '' == false yields false but in Chrome and Firefox it returns true.
JS 1.7 in general added a bunch of neat features (array comprehensions, destructuring assignment, etc) that are only now slowly making their way to specifications after some foot-dragging by certain parties. See https://developer.mozilla.org/en/JavaScript/New_in_JavaScrip...
The only difference is there's no way to return a value from the blocks because this: var name = { return 'Awesome' }
...wouldn't work because, besides return being only for functions, when you use the = it assumes an object literal and throws a syntax error.