Shift-2

 

JavaScript shift() function return values is the removed item. The output of [100, 1000, 200, 3000].shift() will be 100. See the code snippet:

 
 
 
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> </head> <body> <script> var element = [100, 1000, 200, 3000].shift(); document.write("Removed element is : " + element ); </script> </body> </html>
Output