How to get the source code of a function from its link?

  • 0
    Hello everyone! I have a totally useless target, but I'm just wondering - how do I find out the source code of a function using its reference? For example:
    function myFunc() {
     alert("Hello World!")
    }

    If you use the link console.log (myFunc) , it will return an object with a bunch of methods. So how do you find its source code?
    JavaScript Elizabeth Smith, Feb 23, 2019

  • 2 Answers
  • 0

  • 0
    myfunc.prototype.constructor
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!