DEV Community

Discussion on: How to remove an element from an array?

Collapse
 
ramjak profile image
Rama Jakaria • Edited

and my favorite's:

arr = [1,2,3,4]
arr.length = arr.length - 1
Enter fullscreen mode Exit fullscreen mode