Cómo verificar si existe el objeto en JavaScript
if (typeof maybeObject != "undefined") {
alert("GOT THERE");
}
Smiling Stoat
if (typeof maybeObject != "undefined") {
alert("GOT THERE");
}
car.hasOwnProperty('color')
if ('color' in car) {
}