Why is the output undefined? I even tried giving timeObject a type of any, but it still doesn't produce the expected result.
const timeObject = {
'On web close': 0,
'10 secconds': 10000,
'8 hours': 28800000,
'12 hours': 43200000
}
let timeToString = (time: number) => {
Object.keys(timeObject).map((key) => {
if (timeObject[key] === time) {
return timeObject[key]
}
})
}
console.log(timeToString(10000))