'use strict'
class student{
constructor(name){
this.name = name;
}
hello(){
alert('hello');
}
}
class stu2 extends student{
constructor(name,grade){
super(name);
this.grade = grade;
}
xx(){
alert('hello');
}
}
var x1 = new student('xiaoli');
var x2 = new stu2('xiaoming',100);
Date() Map() Set()
var time = new Date; // 获取当前时间
time.getDay(); // 礼拜几 0~6
var tms = time.getTime(); // 时间戳,毫秒
var time2 = new Date(tms);
var map = new Map( [ ['1','one'], ['2','two'] ] );
var set = new Set( ['1', '2', '1', '3'] );
for(let a of map){
console.log(a) // ['1', 'one'] ['2', 'two']
}