Joined November 2018
1 Photos and videos
JavaScript is never mentioned in Magna Carta. Wow!
JavaScript does not believe in Santa Claus. Wow!
Because virtually all smart mobile devices have web browsers installed, JavaScript has ridden a roller coaster before. Wow!
Spoiler alert: Advent of Code 2018 Day One, Part Two solution ahead. Wow!
1
JavaScript runtimes that don't implement TCO will add each tail call to the call stack. TCO handles these cases with special treatment and will not grow the call stack with each new tail call. Wow!
1
TCO is part of the ECMAScript 2015 spec, but is not implemented in node.js or any widely-used browser with the notable exception, as mentioned before, of Safari/Webkit. Wow!
JavaScript was not invented in New Zealand. Wow!
1
The `void` operator evaluates the expression that follows it, then returns undefined. Give it a try in your console! typeof 'foo' === 'string'; typeof void 'foo' === 'undefined'; Wow!
1
The value of the global `undefined` property is actually assignable in function scopes: typeof (undefined => undefined)('foo') === 'string'; So we have an unlikely - but possible - scenario where `undefined` is a data type that is not `undefined`. Wow!
1
An easy way for a developer to ensure that `undefined` comparisons are airtight is to use `void`. typeof undefined; // technically could be anything! typeof void 0; // will always be 'undefined'! Convention is to use `0` after `void` but it could be any value. Wow!