// 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