Created
October 16, 2020 19:07
-
-
Save jonathan-fielding/d1cfa01711b14c98a66b98acf3904da8 to your computer and use it in GitHub Desktop.
Duplicating an array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fruits = ["Banana", "Orange", "Apple", "Mango"]; | |
const newFruits = [ ...fruits ]; | |
console.log(newFruits); // ["Banana", "Orange", "Apple", "Mango"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment