What is the difference between null and undefined in JavaScript?
13317-Jun-2024
Updated on 17-Jun-2024
Home / DeveloperSection / Interviews / What is the difference between null and undefined in JavaScript?
Ravi Vishwakarma
17-Jun-2024undefined
means a variable has been declared but not assigned a value.null
is an assignment value that represents no value or an empty value.Read also
What is the purpose of async and await in JavaScript? Provide an example.