There's one aspect of the new Array.from method that I'm not understanding. I'm reading the through the Description section on MDN, and came across the following:
Array.from()has an optional parametermapFn, which allows you to execute a map function on each element of the array (or subclass object) that is being created. More clearly,Array.from(obj, mapFn, thisArg)has the same result asArray.from(obj).map(mapFn, thisArg), except that it does not create an intermediate array. This is especially important for certain array subclasses, like typed arrays, since the intermediate array would necessarily have values truncated to fit into the appropriate type.
I'm not understanding:
...the intermediate array would necessarily have values truncated to fit into the appropriate type
I'm not sure what this is saying, since we're going from a typed array to a normal Array (using Array.from). It's not like any incorrect types will be in the typed array. Also, the resulting Array from Array.from() will of course accept any type like normal JS arrays do.
Could anyone give insight into what this is trying to say or what I'm missing?