Closed nprz closed 8 years ago
@nprz My turn :stuck_out_tongue_winking_eye:
namespace
is a string. But you know, []
<- this means empty array. So basically [namespace]
is an array with 1 element: namespace
.
Converting that into an array let you use array methods like [].concat()
, which doesn't work on strings.
Ahhh, I get it. Thanks, man.
So the official solution is as follows:
However, I am confused by the line
[namespace].concat(slice.call(arguments)
namespace is a string being passed in, no? What's with the brackets surrounding it? Why are they necessary?
Thanks in advanced