**Triangle **
let TotalRow = 7;
var Row = 0;
var CharToPrint = "#";
while (Row <= TotalRow)
{
console.log(CharToPrint+ "\n");
CharToPrint += "#";
Row = CharToPrint.length;
}
FizzBuzz
let n =0;
while (n < 100)
{
n++;
if (n % 5 == 0 && n % 3 == 0)
{
console.log("FizzzzzBuzzzz" + "\n");
n++;
}
if (n % 3 == 0)
{
console.log("Fizz" + "\n");
n++;
}
if (n % 5 == 0)
{
console.log("Buzz" + "\n");
n++;
}
console.log(n + "\n");
}
ChessBoard
let BoardSize = 8;
let CellColor ="";
for (let Col = 0; Col < BoardSize; Col++)
{
for (let Row = 0; Row <BoardSize; Row++)
{
if ((Col + Row) % 2 == 0)
{ CellColor += "□";}
else {CellColor += "■";}
}
CellColor += "<br>";
}
document.write(CellColor);