🔰destructuring array
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
JS ⟩ operator ⟩ assignment ⟩ destructuring ⟩ array
let [a, b] = [1, 2, 3]
let [a, ...rest] = array
💾 程式:replit
// array destructuring
let [a, b] = ["John", "Smith"]
let [a, b] = "John Smith".split(' ')
let [a, , c] = ["hi"