Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Difference between undefined and null

Tags: variable
Undefined:

When the Variable is declared, but not yet assigned any value. Hence, when you try to fetch the value of this variable, you will get the result "undefined".


Null:

null is a value which we can assign it to the variable to represent that there is no value available in the variable.


This post first appeared on Frontend Skills, please read the originial post: here

Share the post

Difference between undefined and null

×

Subscribe to Frontend Skills

Get updates delivered right to your inbox!

Thank you for your subscription

×