Skip to content

Latest commit

 

History

History
22 lines (13 loc) · 607 Bytes

View-function-source-in-developer-tool-console.md

File metadata and controls

22 lines (13 loc) · 607 Bytes
  • Date : 2018-11-21
  • Tags : #javascript #debug

View function source in developer tool console

If you are in console of developer tool and you want to know what the function does, you can view its source by:

  1. call .toSource() of variable or function name in Firefox

Example :

>> function hello(name) { return "Hello " + name; }

>> hello.toSource();
<- "function hello(name) { return \"Hello \" + name; }"
  1. click 'show function definition' in Chrome

show function definition