Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

array destructuring in js

const arr = [1, 2, 3, 4];
const [first, second] = arr; // first = 1, second = 2
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #array #destructuring #js
ADD COMMENT
Topic
Name
6+7 =