对象表达式
2017-10-30 本文已影响4人
基本密码宋
直接上代码啊
//对象表达式
let index=1,breakFast=2;
let method={
index,
breakFast,
innerBreakFast:function () {
//方法的內容
},
innerBreakFast2 (){
//es6的新语法。可以这样直接写
}
}
直接上代码啊
//对象表达式
let index=1,breakFast=2;
let method={
index,
breakFast,
innerBreakFast:function () {
//方法的內容
},
innerBreakFast2 (){
//es6的新语法。可以这样直接写
}
}