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

Level 8/Lesson 1

The following code is not being accepted.
function teaBreak(){
console.log("Start making tea");
console.log("Tea ready");
console.log("Enjoy the tea");
console.log("-------");
}

let teaHour;

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

1 Answer

iamabhishek
Here is the correct answer:

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();
}
}


Your answer looks correct, just try to remove the last console.log statement from the function body.

Login / Signup to Answer the Question.