字符串
- 正常字符串使用单引号 或者 双引号 包裹
- 注意转义字符 \
\'
\n
\t
\u4e2d  \u####  Unicode字符
\x41    Ascll字符
- 多行字符串编写
// tab 上面 esc下面的引号
let msg = `helloworld你好`
console.log(msg)

- 模板字符串
let name = 'ht'
let age = 5;
let msg = `hello${name}你是${age}岁吗?`
console.log(msg)

- 字符串长度
str.length

- 字符串的可变性,不可变
  
- 大小写转换
注意,这里是方法,不是属性
str.toUpperCase()
str.toLowercase()
- 获取指定字符的位置
str.indexOf("str")

- 截取字符串
str.substring(1) // 从第一个字符串截取到最后一个字符串
str.substring(1,3) // [1,3)  含头, 不含尾

https://www.bilibili.com/video/BV1JJ41177di?p=6