By Eric Elliott
interesting! hmm so both pretty much do the same thing then just different syntax?
Very close to the same since both return new objects. Mind, any function in JS can return an object. I haven’t explored very deep down the rabbit hole since I tend to hover around beginner topics and syntax policing, naive versus advanced techniques (the latter of which is my weaker point) so cannot argue for or against either method.
Here is another article by the same author from three years ago…