You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the little understanding an user might have of the apply/call handling I think that the provided solution might be confusing. I would switch from :
var slice = Array.prototype.slice
function logger(namespace) {
return function() {
console.log.apply(console, [namespace].concat(slice.call(arguments)))
}
}
module.exports = logger
to something simpler like
var slice = Array.prototype.slice;
function logger(namespace) {
return function(){
console.log(namespace, slice.call(arguments).join(' ') );
}
}
module.exports = logger;
Any thoughts?
The text was updated successfully, but these errors were encountered:
@edwardbc whoa, sorry I missed this issue. The whole purpose of this exercise is to encourage people to use apply to implement partial application. I will work on the text to make things more clear.
Given the little understanding an user might have of the apply/call handling I think that the provided solution might be confusing. I would switch from :
to something simpler like
Any thoughts?
The text was updated successfully, but these errors were encountered: