I am trying to pass a parameter to function to access an object's element but keep getting ReferrenceError:obj is not defined
const obj = {
'man1': 1,
'man2': 2,
'man3': 3
}
function test(i) {
console.log(obj.man `${i}`)
}
test(1)
test(2)
test(3)