Common Errors in JavaScript
blog.hackages.io
blog.hackages.io
The author states that the following:
typeof result !== 'number'
..returns "Boolean" because it's interpreted as:
typeof (result !== 'number')
I don't believe this is true. typeof has precedence over in/equality [0], so you don't need parantheses, as recommended in the article, like typeof(result). The original statement works as expected.
[0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...