Javascript is def not my main programming language I for practice I wanted to do something simple, at least i thought ;)
This is my code:
function Log () {}
Log.format = function (func, facility, text) {
func("hellow");
};
Log.debug = function(facility, text) {
Log.format(console.warn);
};
When I call Log.debug("we", "deb"); I get a Uncaught TypeError: Illegal invocation error. What am I doing wrong?