3 ms·
Recently I learned that in Javascript, [5 * 5] * 2 // 50 [5 + 5] * 2 // NaN 1 + [5 * 5] * 3 // 76 1 + [5 * 5] - 1 // 124 Interestingly, even Typescrip
by cellis 7y ago
Recently I learned that in Javascript,
[5 * 5] * 2 // 50
[5 + 5] * 2 // NaN
1 + [5 * 5] * 3 // 76
1 + [5 * 5] - 1 // 124
Interestingly, even Typescript will not ( by default ) catch this class of bugs.