Thanks Arden! You can definitely do the same thing with Array.from, but in my case, the ... is better use IMO. Less code, easy to remember, plus performance. Cheers
I kinda like Array.from() because it's so verbose and easy readable, but I guess that's also because not everyone (read: me) is used to spread operators yet. Thanks for the clarification!
Thanks Arden! You can definitely do the same thing with
Array.from
, but in my case, the...
is better use IMO. Less code, easy to remember, plus performance. CheersI kinda like
Array.from()
because it's so verbose and easy readable, but I guess that's also because not everyone (read: me) is used to spread operators yet. Thanks for the clarification!Ah btw, I didn't knew
Array.from
took in two arguments, so an alternative could beCorrect me if I'm wrong.