Closed code-small-white closed 2 years ago
const a={a:1,b:2,c:3} const objMap = (obj, cb) => { Object.entries(obj).map(([key, val]) => cb(val, key, obj)) } objMap(a,console.log)
const a={a:1,b:2,c:3} const objMap = (obj, cb) => { Object.entries(obj).map(([key, val]) => cb(val, key, obj)) } objMap(a,console.log)