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

Is it wrong?

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
Try this:

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.