Array - Push vs Pop

Input

[20, 10, 5, 12, 2]

Output
After Shift
After UnShift
After Pop
After Push
Coding Techniques Used
  • const keyword
  • shift(), unshift(), pop(), push() method
  • CSS: Flexbox