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

Javascript Level 8 Lesson 1

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 == 0)
{
teaBreak();
}
}
by

5 Answers

avishiinash
waiting for answer
afrideen
Please anyone answer this one.
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();
}
}
SaravananRajendran
But i tried this one ...

if((teaHour == 4)||(teaHour==8)||(teaHour==12))
{
teaBreak();
}

Result came as expected but was not accepted
richard2022
I used
if (teaHour=1; teaHour<=12; teaHour+=4){
teaHour()
}

but not accepted.

Login / Signup to Answer the Question.