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

Friday, December 7, 2012

Codecademy: Codeyear Even more dimensions


//sample solution


//Let's create an array that stores 2 hands of poker

//First we define the array
var hands = [];

//We need two items in this array - one for each player.
//Each hand should contain 5 arrays, one for each card.
//Each card array should specify the suit and rank of the card.
//e.g. [6,"C"] for a 6 of clubs
hands[0] = [[6,"C"],[7,"C"],[8,"C"],[9,"C"],[10,"C"]];
hands[1] = [["A","D"],["K","H"],["Q","S"],["J","C"],[10,"D"]];
//test
console.log(hands);

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts