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();
β
Correct Answer: (D)
5
var a =[]; a.unshift(5); a.unshift(22); a.shift(); a.unshift(3,[4,5]); a.shift(); a.shift(); a.shift();
You must be Logged in to update hint/solution