What will be the output of

function square(x) { return x * x; }
[ 4, 5, 8, 9 ].map(square); // gives: [ 16,25,64,81 ]

 Posted by Rajnilari2015 on 12/1/2015 | Category: JavaScript Interview questions | Views: 417 | Points: 40
Select from following answers:
  1. an array of : [ 16,25,64,81 ]
  2. a string of : "16,25,64,81"
  3. an array of : [ 81,64,25,16 ]
  4. Program hangs
  5. All Above

Show Correct Answer


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response