2020年8月26日
摘要: 数组与字符串常用方法 //数组 var arr1 = new Array(2, 3, 4, 5, 6); console.log(arr1); // 判断是否是数组 console.log(arr1 instanceof Array); console.log(arr1.valueOf()); // 阅读全文
posted @ 2020-08-26 21:59 wen22 阅读(232) 评论(0) 推荐(0) 编辑
摘要: JavaScript中数据类型的转换 if中的条件会被自动转为Boolean类型 * 会被转为false的数据 * 会被转为true的数据 参与+运算都会被隐式的转为字符串 * 会被转为空字符串的数据 * 会被转为字符串的数据 * 会被转为数据类型标记的数据 参与*运算都会被隐式的转为数字 * 会被 阅读全文
posted @ 2020-08-26 21:56 wen22 阅读(190) 评论(0) 推荐(0) 编辑