const coffees = [
"light colombian roast", "hawaiian dark roast", "guatemalan blend medium roast",
"madagascar espresso roast", "jamaican dark blue", "jamaican medium roast",
"salvador robusto light", "bali espresso roast"
]
for () {
}
the exercise goes as follows:
Depending on the roast, you prepare the coffee differently. If it is a light roast, you drink it black. If it is a medium roast, you put cream in it. If it is a dark roast, you put cream and sugar in it.
Your job is to iterate the coffees array and output the following sentences for each coffee. Replace the xxx placeholder with the full name of the coffee.
For light roast, output “I’ll have the xxx and drink it black”
For medium roast, output “I’ll have the xxx and add cream only”
For dark OR espresso roast, output "I’ll have the xxx and add cream and sugar
In this exercise, you will use a for…of loop and conditional logic with if/else blocks again. You will also use a new tool to find a smaller string value within a bigger string value. You will also use the logical OR operator || which is similar to the logical AND operator && you have used in previous exercises.
It is so much easier for us to help you if you copy and past the text of your code into a forum post. Please use the </> button or place backticks ``` on new lines before and after your code. You could also share the link to your repl.
Unexpected token, expected } means that you forgot a }. You did not close const coffees = {....