1 2 3 4 5 6 7 8 9 10 |
'use strict'; const p = console.log; const getArray = () => [123, () => 'hello', 'あいう']; const [a, b] = getArray(); const [c, d, e, f] = getArray(); p('a b() :', a, b()); p('c d() e f :', c, d(), e, f); |
1 2 |
a b() : 123 hello c d() e f : 123 hello あいう undefined |