- 博客(4)
- 收藏
- 关注
原创 css选择器 - :not :after :last-child
可组合使用 下面例子是在所有button_item(除最后一个)的后面插入如下内容
2019-10-18 14:16:43
1540
原创 关于变量提升(词法分析)
有两个阶段,分别为分析阶段和执行阶段。 词法分析(优先级如下) 1.分析参数 2.分析函数声明 3.分析变量声明 参数声明会比函数声明优先级更高,如果已有同名参数声明,该参数声明将会被函数声明覆盖。 函数声明会比var声明优先级更高,如果已有同名函数声明,该变量声明undefined将会直接跳过。 function t(userName) { console.log(use...
2019-10-12 17:04:17
330
原创 !!的用法
!''=true !undefined=true !null=true !123=false !'string'=false !转换成布尔类型,空字符串、undefined和null取反都为false,其余都为true !!常常用来做类型判断 if(!!a){ //a!=null&&typeof(a)!=undefined&&a!='...
2019-10-12 14:46:01
83047
原创 ES6的class、extends的用法
class、extends的用法 class Animal{ constructor(name, age) { this.name = name; this.age = age; } getName() { return this.name } } // Dog类继承Animal类 class Dog extends Animal{ constr...
2019-10-12 14:43:28
614
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅