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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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 ofArray.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.