JavaScript 中 null 和 undefined 的区别?

JavaScript代码编程中存在这样两种表示“无”的原始类型:null与undefined。这两种类型常常会使JavaScript的开发人员产生疑惑,在什么时候是null,什么时候又是undefined?