MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/a6txtp/coming_from_python_to_js/eby6bkl/?context=3
r/javascript • u/chroner • Dec 16 '18
const print = console.log
I found my safe space.
156 comments sorted by
View all comments
3
Here's a global version that will output the correct line number in the console as well:
(typeof global !== 'undefined' ? global : window)['print'] = (function() { return Function.prototype.bind.call(console.log, console); })();
1 u/senocular Dec 17 '18 aaaaand now I can't print my page. 1 u/IrishLimey Dec 18 '18 Meh, print is dead.
1
aaaaand now I can't print my page.
1 u/IrishLimey Dec 18 '18 Meh, print is dead.
Meh, print is dead.
3
u/IrishLimey Dec 17 '18
Here's a global version that will output the correct line number in the console as well: