Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Javascript array destructuring

let [a, b] = [9, 5]
[b, a] = [a, b]
console.log(a, b);
//Expected output: 5,9
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #Javascript #array #destructuring
ADD COMMENT
Topic
Name
9+8 =