Javascript Challenges

Running man

We are playing in 'The Running Man' show and we have 9007199254740992 unit times to survive but all the gamers in previous game have been killed even when they have been playing bravely, could you help us?

The following code could make crash your browser!! Be careful!!

var endTheGame = 9007199254740992,
    startTheGame = endTheGame - 100,
    count = 0,
    index,
    result;

for ( index = startTheGame; index <= endTheGame; index++ ) {
    count++;
}

result = count;

Exercise

Correct!
False!

Fix the code to allow us to survive:

var endTheGame = 9007199254740992, startTheGame = endTheGame - 100, count = 0, index, result; for ( index = startTheGame; index <= endTheGame; index++ ) { count++; } result = count;

Exercise

Correct!
False!

Why?