2

When we use the console.log(someObject.someFunction) firebug shows function() string only.

Is there a way i can see/log the code for the function in the console window ? Something similar to what we can achieve using alert(someObject.someFunction) shows the function body.

2 Answers 2

8
myFunction.toString()
Sign up to request clarification or add additional context in comments.

Comments

1

Another solution :

console.log(myFunction + '');

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.