Quotes help make search much faster. Example: "Practice Makes Perfect"

Thursday, November 15, 2012

Codecademy: "Keeping Track"



//sample solution to script.js

//Note: code exists prior to this point

function incrementMoveCount() {
    //gets the html of the span with id
    //moveCount
    //turns it into a number
    //increments it by one
    //sets the html of the span with id moveCount
    //to the new move count
    var oldCount = $("#moveCount").html();
    $("#moveCount").html(parseInt(oldCount) + 1);
}

//Note: code exists after this point

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts