0

Whenever I write

console

I can't seem to find the prop property , when I try to view func in console.

Where does the prop property go and How does the property setting work?

2
  • I know I can access it using func.prop.But where is it set? Commented Nov 29, 2015 at 14:31
  • it is set in the properties of your function Commented Nov 29, 2015 at 14:32

2 Answers 2

1

prop is being defined on the func function reference.

To access the property use func.prop or do console.dir(func) will show the property in the property tree

Sign up to request clarification or add additional context in comments.

1 Comment

do console.dir(func) in console , u'll find the property
0

IMO the following is is more intuitive than console.dir:

  1. Open Firefox instead of Chrome
  2. Run that code in Firefox's web console
  3. Click the returned function
  4. The object inspect subpanel will show the properties.

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.