摘要: js七种内置类型: 1.空值(null) 2.未定义(undefined) 3.布尔值(boolean) 4.数值(number) 5.字符串(string) 6.对象(object) 7.符号(symbol) 除对象之外,其他对象统称为 "基本类型" typeof运算符来查看值的类型返回的是类型的 阅读全文
posted @ 2020-01-06 16:56 孟小孩 阅读(96) 评论(0) 推荐(0) 编辑
摘要: class 语法糖 class 本身就是函数 class MathHandle(){ constructor(x,y){ this.x = x this.y = y } add(){ return this.x+this.y } } const m = new MathHandle(1,2) con 阅读全文
posted @ 2020-01-06 13:33 孟小孩 阅读(88) 评论(0) 推荐(0) 编辑
摘要: es6 模块化 如果 输出的时候是export default 时候倒入 import 对象名 from 路径 即可, 如果有多个export变量,import { fun1,fun2} from 路径 搭建开发环境: 1. npm init 2. npm install --save-dev ba 阅读全文
posted @ 2020-01-06 11:19 孟小孩 阅读(107) 评论(0) 推荐(0) 编辑