Javascript Challenges

Using Array.prototype.map and parseInt

Snippet 1

var result = ['1','10','100','1000','10000', '100000', '1000000'].map(parseInt)

Expected

var result = [1, 10, 100, 1000, 10000, 100000, 100000];

Exercise

Correct!
False!

What's the result of executing Snippet 1 code?

var result = ;

Exercise

Correct!
False!

Why?

Exercise

Correct!
False!

We need to get the same array as in Expected 1, please fix the code:

var result = ['1','10','100','1000','10000', '100000', '1000000'].map(parseInt)