Code to go logo
Created using Figma
Use Cases
Contribute
How to destructure from array in JavaScript
Syntax
By Jad Joubran ·
Last updated Dec 16, 2017
const [lat, lng] = [52.369661, 4.897243]; console.log(lat, lng);
52.369661 4.897243
Dec 16, 2017
1
Jad Joubran
See answer
1
Jad Joubran
Array destructuring
on MDN
Learn JavaScript step by step
Related use cases
How to destructure from object in JavaScript
How to destructure with default value in JavaScript