Sunday, September 17, 2017

undefined và null

typeof trả về kiểu dữ liệu

typeof undefined           // undefined 
typeof null                // object 

toán tử == equal to
toán tử === equal value and equal type
null === undefined         // falsenull == undefined          // true 


You can consider it a bug in JavaScript that typeof null is an object. It should be null. 

No comments:

Post a Comment