Calling a class method from the constructor
You're calling the function init()
, not the method init
of either Base
or the current object. No such function exists in the current scope or any parent scopes. You need to refer to your object:
this.init();
You are missing this
keyword:
this.init();