I have this class definition:
$.note = function() {}
$.note.prototype = {
init: function(note) {
this.note = note;
this.ctrl = document.getElementById(note);
},
// I have these getter functions because I was getting errors using
// myObject.note or myObject.ctrl
getNote: function() {
return this.note;
},
getCtrl: function() {
return this.ctrl;
}
}
I created a new object with this class like this:
var note = new $.note('C');
Which I can access in my console like this:

But when I try and access note.getNote(), I get undefined as the response:

Am I going about accessing these properties incorrectly? I've tried using just note.note or note.ctrl, and I get the same thing...
initprototype is typically code you’d want in your constructor.