Hacker News new | ask | show | jobs
by anaran 4219 days ago
Is that example in the screenshot a good one?

This works fine in a Content Scratchpad of nightly Firefox for me:

  // See also
  // https://github.com/richgilbank/ES6-Repl-Chrome-Extension/issues/12
  function add(a, b) {
    return a + b;
  }
  let nums = [5, 4];
  console.log("foobar" + add(...nums));