Table of Contents
1 隐式转换
1.1 == 不同类型会转成数字再进行比较
// 不是转成字符串 console.log("10" > 2); console.log("0" == false); console.log("1" == true); // 数字相等 console.log(0 == '0'); console.log(0 == false);
Created: 2019-12-10 周二 16:51
// 不是转成字符串 console.log("10" > 2); console.log("0" == false); console.log("1" == true); // 数字相等 console.log(0 == '0'); console.log(0 == false);
Created: 2019-12-10 周二 16:51