Medium
What will the following code display?
var funcs={
A : function() { console.log('A') },
B : function() { console.log('B') },
C : function() { console.log('C') },
D : function() { console.log('D') }
};
['A', 'B', 'C', 'D'].forEach(function(letter, index) {
setTimeout(funcs[letter], index* 10);
});
Author: Jean-marie CléryStatus: PublishedQuestion passed 2055 times
Edit
3
Community EvaluationsNo one has reviewed this question yet, be the first!
Similar QuestionsMore questions about Javascript