assume that I need to get the house object from the background data and process the house object if the house object exists. Is it appropriate for me to deal with it like this?
var obj = data.house;//data
if(obj){
//
}
what about this way?
var obj = data.house;//data
if(typeof obj != undefined){
//
}