Überprüfen Sie, ob das Objekt nicht definiert ist JS
if (typeof car.color === 'undefined') {
// color is undefined
}
Lokesh003
if (typeof car.color === 'undefined') {
// color is undefined
}