codetogo.io icon indicating copy to clipboard operation
codetogo.io copied to clipboard

Use Case Suggestion: add item to array immutable

Open cell99 opened this issue 1 year ago • 0 comments

const num [1,2,3]

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

cell99 avatar Mar 13 '23 15:03 cell99