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

Friday, December 7, 2012

Codecademy: Codeyear Looping


//sample solution


//Here's our suits array
var suits = ["hearts","clubs","diamonds","spades"];

//Using a for loop, make this code log
//the last two items in the array
for (var i = 2; i < suits.length; i++) {
    console.log(suits[i]);
}

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts