jadjoubran / codetogo.io

🚀 JavaScript code to go - Find updated snippets for common JavaScript use cases
https://codetogo.io
MIT License
233 stars 30 forks source link

Use Case Suggestion: add item to array immutable #316

Open cell99 opened 1 year ago

cell99 commented 1 year ago

const num [1,2,3]

to add 4 use const newarray = [...num , 4] instead of push