Question from the Javascript test

Write a Javascript code that prints the indexes of an array.

Hard

What will the following code display?

var names = ['Lea', 'John', 'Rachel', 'Yehuda'];
(function(){
    for(name in names){
        console.log(name);
    }
})();
Author: Jean-marie CléryStatus: PublishedQuestion passed 2096 times
Edit
9
Community EvaluationsNo one has reviewed this question yet, be the first!