JavaScript, Programming, Programming Languages, Computer Science, Data Type.
assign undefined to any variable: Example of assigning undefined to a variable It is not recommend to assign the undefined value to a variable. Normally, we use null to assign an “empty” or “unknown” value to a variable, and we use undefined for checks like seeing if a variable has been assigned.