摘要:
if ( type == 'a' || type =='b' || type == 'c' || type == 'd'){ //... } 可使用ES6中数组实例方法includes const condition = ['a','b','c','d']; if ( condition.inclu 阅读全文
摘要:
一个部门JSON数据中,属性名是部门id,属性值是个部门成员id数组集合,现在要把有部门的成员id都提取到一个数组集合中。 const deps = {'采购部':[1,2,3],'人事部':[5,8,12],'行政部':[5,14,79],'运输部':[3,64,105],}let member 阅读全文