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 dmitripavlutin.com #
 
PREVIOUS NEXT
Tagged: #array #destructuring #js
ADD COMMENT
Topic
Name
2+2 =