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 forum.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #array #destructuring #js
ADD COMMENT
Topic
Name
5+1 =