Using firebug it keeps stating that this.speak is not defined and I don't understand why that is.I am trying to output it to the screen
$(document).ready (function() {
function person(rank, number, id) {
//properties
this.intRank = rank;
this.intNumber = number;
this.strId = id;
this.elOutput = document.getElementById(id);
//methods
this.speak = fucntion(); {
this.elOutput.ierHTML += "<br>" + this.strId;
};
//adds one to int number and speaks message
this.pickUpNumber = function() {
this.intNumber++;
this.strId = "i have" + this.intNumber.toString() + "rocks";
this.speak();
};
};
//object
var Jak = new person(5, "hey ,jack", " Captain");
var Cap = new person(3, "yea cap?", "jacko");
jak.speak(); cap.speak(); jak.pickUpRock();
});
