let obj = {}
obj.name // this is undefined
obj.age // this is undefined
Now I want to return null, How I define obj, not use proxy ?
My js object has this method:
function xxx (key){
if(key === 'name') return null
if(key === 'age') return 'hello age'
return undefined
}
do not know property, but when use property not return undefined