Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

Level 8 Lesson 1 Javascript

function teaBreak(){
console.log("Start making tea");
console.log("Tea ready");
console.log("Enjoy the tea");
}

let teaHour;

for(teaHour=1; teaHour<12; teaHour++)
{
if(teaHour % 3 == 0)
{
teaBreak();
}
}


I have no idea what to do with it. When I ran the code, it gives me the error "Do we need an if condition somewhere? We think so". Can anyone please help me out?
by

1 Answer

kshitijrana14
Try this one

function teaBreak(){
console.log("Start making tea");
console.log("Tea ready");
console.log("Enjoy the tea");
}

let teaHour;

for(teaHour=1; teaHour<=12; teaHour++)
{
if (teaHour%4== 0)
{
teaBreak();
}
}

Login / Signup to Answer the Question.