js "" == 0 結果爲 true

console.log("" * 1); // 結果爲0 兩個不一樣類型值比較,其中一個是數字,另外一個是字符串,會先將字符串轉換爲數字,而後比較數字web
相關文章
相關標籤/搜索