Skip to content

Instantly share code, notes, and snippets.

@tedchoward
tedchoward / example.js
Last active July 12, 2016 15:32 — forked from scripting/example.js
Question about best practice with JS objects and internal method calls
// Capitalize the name of the constructor function
var MessageOfTheDay = function (appName) {
this._readHttpCallback = this._readHttpCallback.bind(this);
this.appName = appName;
if (this.lastMessageText === undefined) {
this.lastMessageText = "";
}
};
messageOfTheDay.prototype = {