Shift and Unshift Method In JavaScript

An engineer by profession and a JavaScript Lover by heart.
First and foremost, I love writing code. Ever since writing my first program in C and manipulating it to produce the desired output. I believe in the power of programming to transform and improve the lives of people around the world.
My curiosity levels are as fresh as when I was a child. I believe in eternal learning and deliberate effort as they are the only way to become the smartest in the room. I am a good timekeeper, always willing to learn new skills and use them in real-life problems.
An ambitious individual with a desire to succeed. A Cricket fanatic. A student who likes to take risks and does not shy away from experimenting with various combinations in life. Striving to do a lot. Wish me good luck ๐๐ผ
My primary interest is in Web Development and Mobile Application Development.
Tech Stack:- ReactJS, NextJS, NodeJS, MongoDB, GraphQL, Javascript Version Control:- Git, Gitlab
- ๐ฆ๐ต๐ถ๐ณ๐ ๐ ๐ฒ๐๐ต๐ผ๐ฑ
The shift method is like the pop method, but it only works at the beginning of the array.
The shift method ๐ฝ๐๐น๐น๐ ๐๐ต๐ฒ ๐ณ๐ถ๐ฟ๐๐ ๐ฒ๐น๐ฒ๐บ๐ฒ๐ป๐ ๐ผ๐ณ๐ณ of the given array and returns it.
This method will ๐ฐ๐ต๐ฎ๐ป๐ด๐ฒ ๐๐ต๐ฒ ๐ผ๐ฟ๐ถ๐ด๐ถ๐ป๐ฎ๐น ๐ฎ๐ฟ๐ฟ๐ฎ๐.
Syntax: array.shift()
- ๐จ๐ป๐๐ต๐ถ๐ณ๐ ๐ ๐ฒ๐๐ต๐ผ๐ฑ
The unshift method is like the push method, but it only works at the beginning of the array.
The unshift method ๐ฎ๐ฑ๐ฑ๐ ๐ป๐ฒ๐ ๐ถ๐๐ฒ๐บ๐ ๐๐ผ ๐๐ต๐ฒ ๐ฏ๐ฒ๐ด๐ถ๐ป๐ป๐ถ๐ป๐ด of an array and returns the new length.
This method will ๐ฐ๐ต๐ฎ๐ป๐ด๐ฒ ๐๐ต๐ฒ ๐ผ๐ฟ๐ถ๐ด๐ถ๐ป๐ฎ๐น ๐ฎ๐ฟ๐ฟ๐ฎ๐.
Syntax: array.unshift(item1, item2, ..., itemx)
๐๐ ๐ฎ๐บ๐ฝ๐น๐ฒ ๐
