01. 数据类型:
1. 基本类型:undefined, boolean, number, string;
引用类型:对象,Array, Date, String, Object, Function
02. Math函数:
2. Math函数
1. Math.random(): 创建一个随机数
1. Math.round(参数): 参数四舍五入
1. Math.abs(参数): 取参数的绝对值
2. Math.max(参数,参数,参数,...): 取参数的最大值
2. Math.min(参数,参数,参数,...): 取参数的最小值
3. Math.ceil(): 向上取整
3. Math.floor(): 向下取整
4. Math.pow(): 计算一个数的几次幂
4. Math.sqrt(): 计算一个数的开方
03. 字符与ASCII码:
3. 字符与ASCII码
1. charCodeAt(下标): 下标取出的字符 转 ASCII码
2. String.fromCharCode:
1. ASCII码 转 化字符
2. 传多个参数,会根据每个ascii参数生成对应的字符,并且拼接在一起
04. 字符串的创建方法
4. 字符串的创建方法
1. 单引号,双引号创建: typeof: 字符串
2. new String()创建: typeof: 对象
05. 字符串的操作方法:
05. 字符串的操作方法
1. indexof: 子字符串在父字符串第一次出现的位置;如果没有就返回-1
1. lastIndexof: 子字符串在父字符串最后一次出现的位置;如果没有就返回-1
2. toLowerCase(): 转化成小写字母
2. toUpperCase(): 转换成大写字母
3. concat(): 拼接字符串
4. search(): 字符串替换
5.substring(): 字符串的截取
6. split(""): 把字符串装换成数组