title: Print function code with parameters JS
body: <p>I want to get all function code (with parameters) and print it in div.code</p>
  
  <p>html file</p>
  
  <pre><code>&lt;script src='script.js'&gt;&lt;/script&gt;
  ...
  &lt;input type=text value='text' id='my_input'&gt;
  &lt;div class='code'&gt;&lt;/div&gt;
  &lt;script&gt;
     document.querySelectorAll('div.code')[0].innerHTML=func(document.getElementById('my_input'));
  &lt;/script&gt;
  </code></pre>
  
  <p>script.js</p>
  
  <pre><code>function func(param){
  console.log(param);
  }
  </code></pre>
  
  <p>So in div.code it should be</p>
  
  <pre><code>"function func(text){
      console.log(text)
      }"
  </code></pre>
  
  <p>What should I use to do it ? I tried to use toString, toSource, JSON.stringify but it does not work</p>