JavaScript Tutorial/Number Data Type/Undefined

Материал из Web эксперт
Перейти к: навигация, поиск

Undefined Values

The variable is "undefined" if no value has been assigned to it.

Undefined number value is NaN.

Undefined string value is "undefined".

Undefined boolean value is false.

The undefined property is a primitive value of the global object.

undefined is returned by variables that have not had values assigned to them.

undefined is also returned by methods if the variable being evaluated is not assigned a value.

The following example tests a Variable to See if It is Undefined.



   <source lang="javascript">

<html>

   <script language="JavaScript1.3">
   
   </script>

</html></source>