摘要: 1. typeof 鉴于 ECMAScript 是松散类型的,因此需要有种手段来检测给定变量的数据类型,typeof 就是负责提供这方面信息的操作符。对一个值使用 typeof 操作符可能返回下列某个字符串:( 缺点:对于数组和对象或null 都会返回object) "undefined" ——如果 阅读全文
posted @ 2019-12-25 17:39 执手听风吟 阅读(2405) 评论(0) 推荐(0) 编辑
摘要: 次方:Math.pow(值,次方数) 例如:Math.pow(2,2); 2的平方 Math.Pow(2,3); 2的立方 开方:Math.sqrt(值) 例如:Math.sqrt(9); 9开方,返回结果3 阅读全文
posted @ 2019-12-25 16:39 执手听风吟 阅读(4412) 评论(0) 推荐(0) 编辑