As I strive to retrieve the arguments from the function passed as a parameter in order to ensure they are properly forwarded, an error has emerged:
TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them
How can I access the arguments for the func so that when calling it, I can successfully pass the message through?
UPDATE: Could it be that my struggle lies in why I am unable to log func.arguments
?
function a(func){
console.log(func.arguments)
return function(){
func.apply(null, func.arguments);
}
}
function log(message){
console.log(message)
}
a(log.bind('hello'))()