Javascript Challenges

Invaluable

We have the following code:

var strMethod = 'valueOf',
    strProperty = 'length',
    result;

Snippet 1

When we execute the Snippet 1, result has a value of 1.

result = [44 + 22][strMethod]()[strProperty];

Exercise

Correct!
False!

Why?

Snippet 2

When we execute the Snippet 2, result has a value of 0.

value = [44 + 22][strMethod][strProperty];

Exercise

Correct!
False!

Why?