UNPKG

@ahsolo/lotide

Version:

lotide assignment for Lighthouse Labs coding bootcamp

8 lines (7 loc) 189 B
const findKey = function(object, callback) { for (const [key, value] of Object.entries(object)) { if (callback(value)) return key; } return undefined; } module.exports = findKey;