참고 :
https://www.cnblogs.com/ly0612/p/6696982.html
원래 유형에 널 (null)과 정의되지 않은 JS는 무엇의 차이가 있습니까?
정의
- 변수가 선언하지만, 초기화되지 않은 경우, 그것은 정의되지 얻을. 반환 값을 반환하지 않는 함수가 정의되지 않은, 어떤 매개 변수 인수는 정의되지 않습니다. 그것은 미리 정의 된 전역 변수이다.
var oValue;
alert(oValue == undefined); //output "true"
- 널 널 객체 포인터가 개체를 나타내는, 즉 존재하지 않는
alert(null == document.getElementById('notExistElement'));
려고 할 때 DOM 노드는 사실 코드를 존재하지 않는
유형
- 타입은 미정 정의되지
- Object 유형의 널 (null)
alert(typeof undefined); //output "undefined"
alert(typeof null); //output "object"
==
ECMAScript를 그렇게 동일로를 정의하기 위해, 널 (null)에서 파생 정의되지 않은 생각합니다.
alert(null == undefined); //output "true"
===과 거짓