I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
TIL function.prototype.apply(). I was looking at your "old way" and thinking, what is she talking about? :)
I guess in Javascript whenever I've wanted to pass in an array it's always been to a function that accepts arrays. I've seen people talk about the spread operator but for functions I'd expect the need to be the other way around (as with C-like functions like printf(), where you'd probably never want to convert an array to a series of parameters)
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.
TIL
function.prototype.apply()
. I was looking at your "old way" and thinking, what is she talking about? :)I guess in Javascript whenever I've wanted to pass in an array it's always been to a function that accepts arrays. I've seen people talk about the spread operator but for functions I'd expect the need to be the other way around (as with C-like functions like
printf()
, where you'd probably never want to convert an array to a series of parameters)