Kindly read my below post for understanding undefined.
Null is like N/A(not applicable). It’s a non-value, nothing. Both undefined and null indicates absence of value. After declaring a variable but not defined, variable is undefined. But, suppose you want that variable to be non-value, then use null.
var rai=null; console.log(rai);
It will print null.