Candy Box 2 Wiki
Advertisement

class MyClass{

   private someNumber: number = 9;
   private someString: string = "blah";
           
   constructor(test: number){
       this.someNumber = test;
   
       this.methodTest();
   }
 
   public methodTest(): void{
       this.someString = "blablah";
   }

}

Advertisement