4 ms·
Yeah, where right now you must use a self-invoking function, the let keyword would imitate that behavior with just {}'s. Less typing. The only difference is th
by firefoxman1 15y ago
Yeah, where right now you must use a self-invoking function, the let keyword would imitate that behavior with just {}'s. Less typing.
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.