Q:

Why this loop freezes my browser?

Why browser hangs executing this?
for(var i= 9007199254740993;i<9007199254740994;i++) {
    console.log(i);
}

A:

The integers you are trying to use are larger than 2^53. JavaScript cannot represent those integers precisely. Lets have a look at the console: 
> var i = 9007199254740993;
undefined
> i++
9007199254740992
> i++
9007199254740992
> i++
9007199254740992
...

As you can see, due to loss of precision, the value of i doesn't change, thus the condition will always be true, resulting in an infinite loop.

