codetogo.io
codetogo.io copied to clipboard
Use Case Suggestion: add item to array immutable
const num [1,2,3]
to add 4 use const newarray = [...num , 4] instead of push
const num [1,2,3]
to add 4 use const newarray = [...num , 4] instead of push