Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Igor Yamshchykov24,397 Points
Null and undefined difference?
What is actual difference between null and undefined ? When do both of them appear, and what are the special cases when they appear? What is appropriate use ? should I assign null to a variable that I want to be null or undefined ? And Why ? Would actually appreciate some article about it. Thank you
Jonathan GrieveTreehouse Moderator 91,252 Points
Yea Mithun was right.
Null is an empty value, like an array index referencing a key that doesn't exist or has nothing in it.
Undefined is a variable that has been referenced but doesn't actually exist.