JS index page

启用严格模式-在JavaScript代码的第一行写上: 'use strict'

# Number

3.14e3 // ==3.14x1000
2 / 0; // Infinity // 无限大
0 / 0; // NaN
1
2
3

this.$route

NaN === NaN; // false
isNaN(NaN); // true
1
2

# 字符串

转义字符\,例'\x41'等同于 'A'  
`console.log('\x41')`

let str = 'String'

// 字符串模板
console.log(`我的
名字
是${str}`)

// 转大写
let dx=str.toUpperCase()
console.log(dx)

// 转小写
let xx=str.toLowerCase()
console.log(xx)

str.indexOf('t')
str.substring(0,2)
str.substring(7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21