by _the_inflator · 5y ago · 0 comments
Function.prototype.toString() is really the craziest thing I know to date regarding JS. Heavily used in earlier versions of jQuery according to the book.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
To be honest, I don’t know that there’s ever a good reason to use it in production as it almost always involves performance and security problems.
Except when it solves them! https://mrale.ph/blog/2018/02/03/maybe-you-dont-need-rust-to...
function foo() { /* a comment! / }
console.log(foo.toString()); //-> "function foo() { /
a comment! */ }"