What is the output of this program?

let weather = "sunny";

if (weather == "rain") {

document.write("Wear a raincoat.");

}

else {

document.write("No raincoat needed today!");

}

(1 point)
Responses

an error message because the closing brace for the if statement is on the same line as the word else

an error message because the closing brace for the if statement is on the same line as the word else

an error message because document.write() instead of console.log() is used

an error message because document.write() instead of console.log() is used

“Wear a raincoat.”

“Wear a raincoat.”

“No raincoat needed today!”

“No raincoat needed today!”