Retired mechanical engineer dabbling with Vanilla JS and other webdev as a hobby. I don't look for answers in libraries or frameworks as they take the fun out creating your own solutions.
Location
Los Angeles
Education
Engineering, Physics, and Math
Pronouns
Sorry, I don't do delusional pronouns. I was born with a pen is--period.
Work
Retired but formerly at BAE Systems and Northrop Grumman
As a temporary measure for writing quicker console.log()'s just put the following in a temporary file (for polluting the global namespace) and link it to the top of your web application then unlink it when no longer needed:
constlog=(...args)=>console.log(...args);
Now you can easily do...
log(message,' : ',func.name,func(arg));ErroratnameOfFunc:undefined// example output
This is especially useful when logging multiple test cases in a single run. Similarly can be done with the other console methods. And if you really want to go crazy, this can also be done with Object.prototype.methods but you must often bind the function to the calling object's scope by setting the context with Function.prototype.bind or Function.prototype.call. I think ES5 and ES6 have made Function.prototype.apply obsolete so I don't use it or recommend it anymore. But only do this on very small projects or inside created objects.
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.
As a temporary measure for writing quicker
console.log()'s just put the following in a temporary file (for polluting the global namespace) and link it to the top of your web application then unlink it when no longer needed:Now you can easily do...
This is especially useful when logging multiple test cases in a single run. Similarly can be done with the other console methods. And if you really want to go crazy, this can also be done with
Object.prototype.methodsbut you must often bind the function to the calling object's scope by setting the context withFunction.prototype.bindorFunction.prototype.call. I think ES5 and ES6 have madeFunction.prototype.applyobsolete so I don't use it or recommend it anymore. But only do this on very small projects or inside created objects.