Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Rest and spread operators in ES6

var array = ['red', 'blue', 'green']
var copyOfArray = [...array]

console.log('Copy of', array, 'is', copyOfArray)
console.log('Are', array, 'and', copyOfArray, 'same?', array === copyOfArray)
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Rest #spread #operators
ADD COMMENT
Topic
Name
4+9 =