Hi I don\'t know whether this is my mistake in understanding Javascript prototype object ..
Well to be clear I\'m new to the Javascript singleton concept and lack c
Update: Seeing your updated code, the return
from referrelSystem
won't work as expected, since return values are discarded when calling new referrelSystem()
.
Rather than returning an object, set those properties to this
(the instance of referrelSystem that gets constructed):
var referrelSystem = function () {
// I assume you have other code here
this.login = getSignedIn;
this.initTwitter = initTw;
};