undefined vs null

김_리트리버·2020년 10월 1일
0

undefined

= 변수를 선언하고 값을 할당하지 않음

null

= 변수를 선언하고 빈값(null) 을 할당함
= 변수타입은 객체가 됨

undefined => 투명색 , 색이 없음

null => 흰색 , 색을 할당하긴 했는데 빈색깔임

profile
web-developer

0개의 댓글