Skip to content

Instantly share code, notes, and snippets.

@jjcall
Last active August 29, 2015 14:14
Show Gist options
  • Select an option

  • Save jjcall/6b0ebf99eece0a8f3ebd to your computer and use it in GitHub Desktop.

Select an option

Save jjcall/6b0ebf99eece0a8f3ebd to your computer and use it in GitHub Desktop.

Revisions

  1. jjcall revised this gist Jan 28, 2015. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions blastoff.js
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    function blastOff(n) {
    for(n; n>=0; n--) {
    console.log(n);
    function blastOff(turd) {
    for(turd; turd>=0; turd--) {
    console.log(turd);
    }

    console.log("Blast Off");
  2. jjcall revised this gist Jan 28, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion blastoff.js
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    function blastOff(n) {
    for(n;n>=0;n--) {
    for(n; n>=0; n--) {
    console.log(n);
    }

  3. jjcall revised this gist Jan 28, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions blastoff.js
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    function blastOff(n) {
    for(n;i>=0;i--) {
    console.log(i);
    for(n;n>=0;n--) {
    console.log(n);
    }

    console.log("Blast Off");
  4. jjcall revised this gist Jan 28, 2015. 1 changed file with 2 additions and 9 deletions.
    11 changes: 2 additions & 9 deletions blastoff.js
    Original file line number Diff line number Diff line change
    @@ -1,16 +1,9 @@
    function blastOff(n) {
    // Check if is not 0.
    if( n !== 0) {
    // assign n to i.
    // subtract 1 from i while its greather than or equal to 0
    for(i=n;i>=0;i--) {
    // log i to the console
    for(n;i>=0;i--) {
    console.log(i);
    }

    // blast off after 0 is logged to the console
    console.log("Blast Off");
    }
    }
    }

    blastOff(4);
  5. jjcall renamed this gist Jan 28, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. jjcall created this gist Jan 28, 2015.
    16 changes: 16 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    function blastOff(n) {
    // Check if is not 0.
    if( n !== 0) {
    // assign n to i.
    // subtract 1 from i while its greather than or equal to 0
    for(i=n;i>=0;i--) {
    // log i to the console
    console.log(i);
    }

    // blast off after 0 is logged to the console
    console.log("Blast Off");
    }
    }

    blastOff(4);