loading...

re: 13 useful JavaScript array tips and tricks you should know VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I didn't know about the second parameter of Array.from() as well, but I don't actually see a reason to use it instead of Array.map() in any situation.
 

MDN says, "Array.from(obj, mapFn, thisArg) has the same result as Array.from(obj).map(mapFn, thisArg), except that it does not create an intermediate array." This suggests it might perform a little better, in extreme cases.

Code of Conduct Report abuse