// Check if 'city' exists in the object using the 'in' operator if ('city' in myObject) { console.log('The key "city" exists in the object.'); } else { console.log('The key "city" does not exist in the object.'); }