![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
技术
文章平均质量分 58
Sundaisy1213
这个作者很懒,什么都没留下…
展开
-
JavaScript中this的知识点
JavaScript中的this以下内容属于个人的归纳总结(请大神们多多指点!!!) 随着函数的使用场合不同,this的值会发生变化(this代表函数运行时自动生成的一个内部对象)全局执行console.log(this);//浏览器:Window //node:global函数中执行纯粹的函数调用function hello(){ console.log原创 2016-09-21 20:43:58 · 321 阅读 · 1 评论 -
数值转换
三个数值转换的函数 Number() 可以用于任何数据类型 parseInt() 用于把字符串转换成数值 parseFloat() 用于把字符串转换成数值 Number()函数 数据类型 转换后的数值 Boolean true->1 false->0 数字 简单的传入和传出 null 0 undefined NaN Object原创 2016-10-04 15:22:27 · 500 阅读 · 0 评论 -
让代码更优雅之解构赋值、扩展操作符
为了加深对解构赋值和扩展操作符概念的理解,今天随我来归纳总结一番 解构赋值解构赋值可以快速的取得数组或对象中的元素或属性1. 数组解构1.1 基本变量赋值let array = [1, 3, 4]; let [a, b, c] = array; console.log(a); //1 console.log(b); //3 console.log(c); //4再来看看传统方式赋值let foo原创 2017-01-13 16:42:11 · 1555 阅读 · 0 评论