You are browsing the archive for ECMA 5.

JavaScript Quiz #9

August 23, 2013 in JavaScript

Assume that we have the following short JavaScript code:

<script>
    var x = [1, 2, 3, 4].map(function(x, y) { return x + y } );
    
    alert(x);
</script>

What is the alert output?

Read the complete answer

Skip to toolbar