JavaScript的類型轉換,顯式轉換和隱式轉換

isNaN()判斷非數,非數是轉換true, Number返回false,isNaN()先要進行隱式轉換在判斷 NaN與包括自己在內任何東西都不相等 undefined == null 返回true Typeof(null)—object Typeof(a)— undefined +undefined— NaN -true— -1 Typeof : number,string,boolean,ob
相關文章
相關標籤/搜索