Сделал всё-таки. Как и хотел.
var moto = {
motorcycle1: {
color: "Черный",
model: "Suzuki",
MaxSpeed: 120
},
motorcycle2: {
color: "Красный",
model: "Honda",
MaxSpeed: 125
},
motorcycle3: {
color: "Белый",
model: "BMW",
MaxSpeed: 105
},
motorcycle4: {
color: "Красный",
model: "Ducati",
MaxSpeed: 130
},
motorcycle5: {
color: "Белый",
model: "Kawasaki",
MaxSpeed: 150
},
motorcycle6: {
color: "Зеленый",
model: "Урал",
MaxSpeed: 90
},
motorcycle7: {
color: "Черный",
model: "Yamaha",
MaxSpeed: 160
}
};
var color = prompt("Введите цвет мотоцикла");
var speed = +prompt("Введите максимальную скорость");
for (var key1 in moto)
for(var key2 in moto [key1]){
if(moto[key1].color == color && moto[key1].MaxSpeed >= speed){
var a = key1;
alert(a);
break;
}
};