forked from airbnb/javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathes5.test.js
93 lines (39 loc) · 1.1 KB
/
es5.test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// ES6 代码规范练习场
// 为便于测试,关闭部分规则检测
/* eslint no-unused-vars: 0 */
// [类型](#types)
// 使用 let const 替代 var
var type11 = 123
var type2 = 'hello'
const type3 = 123
let type4 = 123
// type4 = 456
const type5 = 'hello'
const type121 = [1, 2]
const type122 = type121
type122[0] = 9
console.log(type122[0], type122[0])
// [引用](#references)
// [对象](#objects)
// [数组](#arrays)
// [解构](#destructuring)
// [字符串](#strings)
// [函数](#functions)
// [箭头函数](#arrow-functions)
// [类 & 构造函数](#classes--constructors)
// [模块](#modules)
// [Iterators and Generators](#iterators-and-generators)
// [属性](#properties)
// [变量](#variables)
// [提升](#hoisting)
// [比较运算符 & 等号](#comparison-operators--equality)
// [代码块](#blocks)
// [注释](#comments)
// [空白](#whitespace)
// [逗号](#commas)
// [分号](#semicolons)
// [类型转换](#type-casting--coercion)
// [命名规则](#naming-conventions)
// [存取器](#accessors)
// [事件](#events)
// [jQuery](#jquery)