Salesqueen Software Solution

Download Free Estimation Now Click Here
Notifications
Clear all

What is the difference between null value and undefined value in JavaScript?

3 Posts
3 Users
0 Reactions
121 Views
Posts: 150
Topic starter
(@dinesh)
Estimable Member
Joined: 2 years ago

null value and undefined value

2 Replies
Posts: 461
(@dinesha-g)
Reputable Member
Joined: 2 years ago

Undefined value

It is not a value for assignments. It indicates that a variable has been declared but not yet given a value. It is itself a type. When a variable has not been given a value, the primitive value undefined is utilised. Undefined implies that the variable is not present.

Null

It is a value for an assignment. It can be set to a variable to show that it does not point at anything. It is a thing. The primitive value known as "null" stands for a null, empty, or non-existent reference. A variable's null value denotes the absence of a value.

Reply
Posts: 100
 Kavi
(@kavi)
Estimable Member
Joined: 2 years ago

Undefined value

A variable that has the undefined property has not even been declared. It is a feature of ECMAScript 1 (ES1). Chrome, Microsoft Edge, Internet Explorer, Firefox, Safari, and Opera Mini are the supported browsers. It has a universal quality.

Null

The absence of any object value is represented by the value null. The JavaScript value is primitive. It has the syntax -:null. Chrome, Microsoft Edge, Internet Explorer, Firefox, Safari, and Opera Mini are among the browsers that it supports.

Reply
Share: