Undefined is a global read-only variable that represents the value Undefined. Undefined is a type of primitive type
var variable = undefined; // or var no;
Both no and variable contain an undefined value.
Example: In the below example, the variable name is declared but not assigned with any value, so it gets an Undefined value:
Example: In the below example sayhi() function actually outputs and returns nothing. In the above we assigned the sayhi function to the x variable, so we get an Undefined value in the x variable as the sayhi() function returns nothing.
hi hike value in x=undefined
Please Login to comment...