"Modify the car-painting example so that the car is painted with your favorite color if you have one; otherwise it is painted w/ the color of your garage (if the color is known); otherwise it is painted red." Car-painting example: car.color = favoriteColor || "black";
How or what do I need to do to make my script work?
car.color = favoriteColor || "red";
if (car.color = favoriteColor ){
alert("your car is " + favoriteColor);
} else if (car.color = garageColor){
alert("your car is " + garageColor);
} else {
car.color = "red";
}