Explain the unshift() method ?
unshift
method adds an element to the start of an array in JavaScript. The time complexity for the same is O(N) and it is not very efficient.
Explain the unshift() method ?
unshift
method adds an element to the start of an array in JavaScript. The time complexity for the same is O(N) and it is not very efficient.