A

Admin • 833K Points
Coach

Q. What will be the output obtained by "shift ()" in the given code of JavaScript?

Code:
var a =[];
a.unshift(5);
a.unshift(22);
a.shift();
a.unshift(3,[4,5]);
a.shift();
a.shift();
a.shift();
  • (A) Exception is thrown
  • (B) [4,5]
  • (C) [3,4,5]
  • (D) 5
  • Correct Answer - Option(D)
  • Views: 26
  • 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.