The reason you might use Array.prototype.slice.call() or [].slice.call() is because of lack support for IE for Array.from() and [...](spread operator) so even its good to know, its kind of useless as "trick" . Anyway thank you for rest examples, good to refresh memory :)
Code, write, talk, and doodle about JavaScript & stuff. 🐱-as-a-Service: HTTP Status Cats, RasPi KittyCam, Git Purr 💻 I have more (older) writings about the web on girliemac.com.
The reason you might use
Array.prototype.slice.call()
or[].slice.call()
is because of lack support for IE forArray.from()
and[...]
(spread operator) so even its good to know, its kind of useless as "trick" . Anyway thank you for rest examples, good to refresh memory :)Ahhh IE. Web devs nowadays must be happier people that used to be.