When I console.log
an object in Chrome, I see all properties and a method name, but I can't see the contents of the method itself. How can I view the contents of an object's method?
I've created a JSFiddle that may help explain what I'm looking for.
Remember that function
is just syntactic sugar for the Function
object. Because of this Object
's toString()
is inherited.
So, to answer your question:
console.log(someObj.methodOne.toString())
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With