Last Updated: February 25, 2016
·
1.588K
· stuk

Exploring functions in the Chrome Dev tools

Edit: an easier way is console.dir(fn). Thanks to @ELV1S on Twitter.

If you have a function with properties directly on it, logging it directly in the Chrome dev tools console will do toString and you'll just see its source:

Picture

However, if you wrap it in an object, then you can use get disclosure triangle that allows you to explore all of it's properties:

Picture

Much better!

2 Responses
Add your response

Awesome job! I can't wait to try putting it to use!

over 1 year ago ·

Dinky tip!

over 1 year ago ·

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.

Security insights from Cside