Handling arguments in a Python-like range() function in JavaScript
I like the edited version.  I'd suggest just one small change:

const range = (...args) =&gt; {
  if (args.length &lt; 1 || args.length &gt; 3) {
    throw new Error('This function takes between 1 and 3 arguments')
  }
  let [start, stop, step = 1] = args
  ;[start, stop] = (stop === undefined) ? [0, start] : [start, stop]
}


Aside from reducing the visual clutter of the if statement, in general I find that expressions (which always execute) are easier to reason about than branching statements, even though the resulting logic is the same.