Is there syntactic sugar for calling a function on each element of a list in JavaScript?
Let’s say I had the following code: let array = [1, 2, 3] array.forEach(x => someFunc(x)) In Java, I know the second line could be simpler using Streams (at least for static methods), like so: array.stream().map(ClassName::someFunc) … Essentially I’m asking is there an analog for the ClassName::someFunc part in JavaScript, instead of having to write… Read More Is there syntactic sugar for calling a function on each element of a list in JavaScript?