I am trying to call the function MyMethod from within a object but none of the syntax below works. There must be a really obvious error below but I can\'t see it.
you have put the call to the private method inside the constructor of the javascript class. in that point the functions are not yet initialized
but if you initialize the object like so:
var test = new MyObject();
and then do this:
test.myMethod();
it will work.