News for hackers. Stuff that matters.
Re:Modern Javascript: Everything you missed over the last 10... by TheAceOfHearts on Sunday May 16, 2021 @04:40PM (#27176836)
Someone already commented that you can use `[...iterable]` to convert any iterable into an array, but if you're doing this just to call forEach on it then it's probably better to use for-of in order to avoid allocating an additional array:

    for (const item of iterable) {
      // do forEach stuff here
    }

There are no comments on this comment yet.