19_destruct_3.js 151 B

1234567
  1. let arr = [1,2,3,4, 5,6,7,10];
  2. let {0: a, 1: b, length = arr.length} = arr;
  3. console.log(a); // 1
  4. console.log(b); // 2
  5. console.log(length); // 8