Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions chessboard.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>

<body>
<script>
let size = 8;

let chessBoard = "";

for (let y = 0; y < size; y++) {
for (let x = 0; x < size; x++) {
if ((x + y) % 2 == 0)
chessBoard += " ";
else
chessBoard += "#";
}
chessBoard += "\n";
}

console.log(chessBoard);
</script>
</body>

</html>
29 changes: 29 additions & 0 deletions fizzbuzz.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>

<body>

<script>
for (let num = 1; num <= 100; num++) {
if (num % 3 == 0 && !(num % 5 == 0)) {
console.log("Fizz")
} else if (num % 5 == 0 && !(num % 3 == 0)) {
console.log("Buzz")
} else if (num % 3 == 0 && (num % 5 == 0)) {
console.log("FizzBuzz")
} else {
console.log(num)
}
}

</script>
</body>

</html>