JavaScript for beginners - Chapter 14 - Data types Part 10 - Null

preview_player
Показать описание
null in JavaScript.
JavaScript includes two additional primitive type values - null and undefined, that can be assigned to a variable that has special meaning.
null in Javascript :
A null means absence of a value.
We can assign null to a variable to denote that currently that variable does not have any value but it will have later on.

In the above example, null is assigned to a variable myVar. It means we have defined a variable but have not assigned any value yet, so value is absence.

A null value evaluates to false in conditional expression. So you don't have to use comparison operators like === or !== to check for null values.

ankpro
ankpro training
C#
C sharp
Bangalore
Rajajinagar
Selenium
Coded UI
Mobile automation testing
Mobile testing
JQuery
JavaScript
.Net
Рекомендации по теме