首页 > 其他分享 >【补充】es6的简写推导

【补充】es6的简写推导

时间:2023-08-06 22:34:57浏览次数:36  
标签:function es6 name 推导 age var 简写

【补充】es6的简写推导

// es6的简写形式
var a = {"name": "dream", "age": 19}
var b = {name: "dream", age: 19} // 一次简写
var name = "dream"
var age = 19
var f = function (){}
var d = {"name": name, "age": age,"f":function () {}} // 二次简写
var e = {name, age,f} // 三次简写 ---> {"name": name, "age": age,f:function () {}}

标签:function,es6,name,推导,age,var,简写
From: https://www.cnblogs.com/dream-ze/p/17610248.html

相关文章