You mean cranksoft optimization makes null as 'undefined’?

Not exactly. I’m still investigating into this issue, so can’t say exactly what happened. Answering your question:

for (var i = 0; i < 10000; i++) {
console.log(typeof null);

That case valid, I’m not seeing issues with typeof null. Same as with typeof ‘undefined’ and other types. This issue reproducing only when you are comparing them.

One more strange thing I can show you with a screenshot.

The only one difference between them is a let instead of var. So, it happens only when you check for equality of both strings and somehow let breaks this also.

I’m going to dive into V8’s IR of this bug, hoping to find more information about this.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.