UNPKG
@ahsolo/lotide
Version:
latest (1.0.2)
1.0.2
1.0.1
1.0.0
lotide assignment for Lighthouse Labs coding bootcamp
github.com/ahSOLO/lotide
ahSOLO/lotide
@ahsolo/lotide
/
findKeyByValue.js
7 lines
(6 loc)
•
177 B
JavaScript
View Raw
1
2
3
4
5
6
7
const
findKeyByValue =
function
(
obj, search
) {
for
(
const
[key, value]
of
Object
.
entries
(obj)) {
if
(search === value)
return
key; } };
module
.
exports
= findKeyByValue;