What is the difference between undefined and null in JavaScript?

Asked by Last Modified  

Follow 2
Answer

Please enter your answer

I am online Quran teacher 7 years

undefined means a variable has been declared but has not yet been assigned a value, whereas null is an assignment value, meaning that a variable has been declared and given the value of null .
Comments

Experienced Full Stack Developer and Instructor.

undefined: It is a type in JavaScript.Indicates the absence of a value or that a variable has been declared but not assigned a value. null: It is an object (due to a historical bug in JavaScript).Represents the intentional absence of any object value, used explicitly to denote "nothing" or "empty." ...
read more
undefined: It is a type in JavaScript.Indicates the absence of a value or that a variable has been declared but not assigned a value. null: It is an object (due to a historical bug in JavaScript).Represents the intentional absence of any object value, used explicitly to denote "nothing" or "empty." read less
Comments

Related Questions

How to start Learning Javascript, Jquery and Angular
Very easy, your requirement in advanced client side technologies, you can get this course every where
Profile Photo
Sandeep
Should I learn Python or JavaScript as a newbie?
Python is different from javascript. I prefer you go with python as it is in boom now.
Profile Photo
Manisha
0 0
View Comments6
x eskor plus two x plus one
what is the question? can't understand the meaning.
Profile Photo
Ankur
0 0
View Comments8

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons


JavaScript Arrow Function
Javascript Arrow Functions : JavaScript ES6 is a type or version which let us provide a way to write javascript syntax in a better way. ES6 version is having a feature or new method to use functions...
A

Abhay

0 1
View Comments0


Java Interview Questions & Answers
Java Interview Questions have been designed especially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Java Programming Language. As per my...
Profile Photo

Angular 1 vs Angular 2
Angular team has released the angular 2, which has drastically change the way programmers interact and work with Angular framework in the past. In this post I will tell you the common changes made by...
Profile Photo

Recommended Articles

Here are the top 6 must have skills for every Web Designer : Technical Skills Web designers undoubtedly require very strong technical skills. They must have hands on using Web designing software and tools, such as Adobe Dreamweaver, Fireworks, Photoshop, Flash etc. In addition to the knowledge of design...

Read full article >

Software Development has been one of the most popular career trends since years. The reason behind this is the fact that software are being used almost everywhere today.  In all of our lives, from the morning’s alarm clock to the coffee maker, car, mobile phone, computer, ATM and in almost everything we use in our daily...

Read full article >

Hadoop is a framework which has been developed for organizing and analysing big chunks of data for a business. Suppose you have a file larger than your system’s storage capacity and you can’t store it. Hadoop helps in storing bigger files than what could be stored on one particular server. You can therefore store very,...

Read full article >

Business Process outsourcing (BPO) services can be considered as a kind of outsourcing which involves subletting of specific functions associated with any business to a third party service provider. BPO is usually administered as a cost-saving procedure for functions which an organization needs but does not rely upon to...

Read full article >

Looking for Java Script Training classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you