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

Thursday, January 31, 2013

Codecademy: What should I know?



// Sample solution

var phone = {};
phone.addZero = function(number){
var temp = number.toString();
return ('0'+temp);
}

phone.dialNumber = function(number){
var temp = this.addZero(number);
console.log("dialing "+temp);
}

// Let's tell our phone to call some number. If the number is
// "12345", it should print "dialing 012345" to the Console.
phone.dialNumber("12345");

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts