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
posted on 2020-07-23 11:54  周小姐你好  阅读(203)  评论(0编辑  收藏  举报