4 ms·
> Word "shift" is shorter than the word "unshift". Therefore shift() makes the array shorter. > Word "unshift" is longer than the word "shift". Therefore unshi
by rrishi 2y ago
> Word "shift" is shorter than the word "unshift". Therefore shift() makes the array shorter.
> Word "unshift" is longer than the word "shift". Therefore unshift() makes the array longer.
This is quite useful as I too couldn't remember which is which. Thanks for sharing!