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

1 Answer

0 votes
by

Undefined value: A value that is not defined and has no keyword is known as undefined value. For example:

  1. int number;//Here, a number has an undefined value.  

Null value: A value that is explicitly specified by the keyword "null" is known as a null value. For example:

  1. String str=null;//Here, str has a null value.  

Related questions

0 votes
asked Oct 10, 2022 in JavaScript by SakshiSharma
0 votes
asked Dec 1, 2022 in JavaScript by john ganales
...