16_array_plus_string.js 128 B

123
  1. let arr = ['foo', 'bar', 'baz'];
  2. arr[3] = arr[0] + arr[1] + arr[2];
  3. console.log(arr); // -> ['foo', 'bar', 'baz', 'foobarbaz']