标签:ret reduce log console ons rop res obj object
var obj = {
EuropeKing: 1,
bigHurt: "",
bigLucky: "2",
nonChieftain: "",
smallHurt: "",
smallLucky: "",
}
var res = Object.values(obj).reduce((pre, cur) => {
return +pre + +cur
})
console.log(res) // 3
标签:ret reduce log console ons rop res obj object
原文地址:https://www.cnblogs.com/antyhouse/p/13365481.html