Skip to content

Instantly share code, notes, and snippets.

@raspher
Created May 3, 2018 18:48
Show Gist options
  • Save raspher/430d3d38a40a8bdaa5356d99e671a12f to your computer and use it in GitHub Desktop.
Save raspher/430d3d38a40a8bdaa5356d99e671a12f to your computer and use it in GitHub Desktop.

Revisions

  1. Uzerus created this gist May 3, 2018.
    45 changes: 45 additions & 0 deletions index.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,45 @@
    <!DOCTYPE html>
    <html>
    <head>
    <meta name="description" content="ZJS 2.2 - FizzBuzz">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>JS Bin</title>
    </head>
    <body>
    <script id="jsbin-javascript">
    for (var x=1;x<=100;x++){
    switch (true){
    case (x % 5 === 0 && x % 3 === 0):
    console.log("FizzBuzz");
    break;
    case (x % 3 === 0):
    console.log("Fizz");
    break;
    case (x % 5 === 0):
    console.log("Buzz");
    break;
    default:
    console.log(x);
    }
    }
    </script>



    <script id="jsbin-source-javascript" type="text/javascript">for (var x=1;x<=100;x++){
    switch (true){
    case (x % 5 === 0 && x % 3 === 0):
    console.log("FizzBuzz");
    break;
    case (x % 3 === 0):
    console.log("Fizz");
    break;
    case (x % 5 === 0):
    console.log("Buzz");
    break;
    default:
    console.log(x);
    }
    }</script></body>
    </html>
    15 changes: 15 additions & 0 deletions jsbin.yunemis.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    for (var x=1;x<=100;x++){
    switch (true){
    case (x % 5 === 0 && x % 3 === 0):
    console.log("FizzBuzz");
    break;
    case (x % 3 === 0):
    console.log("Fizz");
    break;
    case (x % 5 === 0):
    console.log("Buzz");
    break;
    default:
    console.log(x);
    }
    }