A

Admin • 833K Points
Coach

Q. What will be the output of following Javascript code:

Code:
var a = [];
a.unshift(1);
a.unshift(22);
a.shift();
a.unshift(3,[4,5]);
a.shift();
a.shift();
a.shift();
  • (A) 1
  • (B) [3,4,5]
  • (C) [4,5]
  • (D) Exception is thrown
  • Correct Answer - Option(A)
  • Views: 23
  • Filed under category JavaScript
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.