const concept = ['arrays', 'can', 'be', 'mutated']; function changeArr(arr){ arr[3] = 'MUTATED'; } changeArr(concept); console.log(concept); const removeElement = newArr => { newArr.pop() }; removeElement(concept); console.log(concept);
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter