DEV Community

Discussion on: How to Remove First Element from Array in Javascript

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

Or, without mutation:

let websites = ['google.com', 'facebook.com', 'youtube.com'];
[, ...websites] = websites
Enter fullscreen mode Exit fullscreen mode