Posted on 2012-08-27 in Happenings
From 2012-08-20 |
Posted on 2012-08-20 in Happenings
Posted on 2012-08-13 in Happenings
Posted on 2012-08-08 in Happenings
Dexter has been doing online programming lessons on http://codecademy.com and he’s finished up the beginner segment… on to function definitions!
var dex=(prompt("chose a number"));
for (i=1;i<=dex;i++)
{
if(i%3===0) // divisible by 3
{
if(i%5===0)// divisible by 5 - fartface
{
console.log("FizzBuzz");
}
else
{
console.log("Fizz");
} // end of divisible by 5 if - fartface
} //div by 3 if
else if(i%5===0)
{
console.log("Buzz");
} // div by 3 else if
else
{
console.log(i);
}//end of div by 3 if
}//end of for