Skip to content

Instantly share code, notes, and snippets.

@teckliew
teckliew / checkerBoard.js
Created April 27, 2015 07:07
Creating a JS checker board grid
//size is the dimension of the square grid
var size = 8,
white = " ",
black = "#",
rowE = "",
rowO = "",
grid = "";
//even grid row
for ( var x = 0 ; x < size; x++){
if (x % 2 === 0){
@teckliew
teckliew / fizzBuzz.js
Created April 27, 2015 05:50
My first JS FizzBuzz (to 100).
var x = 0, num = 0;
while (x<100){
num++;
if((num%3) === 0 && (num%5) !== 0 ){
console.log("Fizz");
}else if((num%3) !== 0 && (num%5) === 0){
console.log("Buzz");
}else if((num%3) === 0 && (num%5) === 0){
console.log("FizzBuzz");
}else{