Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How to Destructuring Array in Javascript?

//destructuring array 
const alphabet = ['a', 'b', 'c', 'b', 'e'];
const [a, b] = alphabet;
console.log(a, b);
//Expected output: a b
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #How #Destructuring #Array
ADD COMMENT
Topic
Name
5+3 =