- 博客(7)
- 收藏
- 关注
原创 2020-12-24
关于ES6中箭头函数之箭头函数简介与语法一、箭头函数简介在ECMAScript中,箭头函数是最有趣的新增特性。顾名思义,箭头函数就是一种使用箭头(=>)定义函数的新语法。与传统的JavaScript函数有些不同,主要集中在以下几个方面:- 没有this、super、argument和new.target绑定 箭头函数中的这些值由外围最近一层非箭头函数决定。- 不能通过new关键字调用箭头函数中没有[[Construct]]方法,所以不能被用作构造函数。如果用new关键字调用箭头函数,则程序会
2020-12-24 17:42:03
167
原创 合并数组去掉重复项
<!-- 合并数组去掉重复项 --><script> // 该函数必须写在前边,否则报错:unique is not a function Array.prototype.unique = function () { var a = this.concat(); // console.log(this)//[1, 2, 3, 4, 3, 4, 5, 5] console.log(a)//[1, 2, 3, 4, 3,
2020-10-10 17:36:08
314
原创 CSS3渐变 圆角矩形 太阳效果
CSS3渐变 圆角矩形 太阳效果<style> .div1 { width: 150px; height: 100px; background-image: radial-gradient(red,yellow,blue); } .div2 { width: 100px; height: 100px; border-radius: 50%; background-image: radi...
2020-03-16 12:18:04
523
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人