Hello I've a question when creating a class with functions.
e.g.
function constructor() {
this.myFunc = function() {
return "Hello World";
}
}
do I have to write the function in that way? this.funcName = function() for every function in that class?
Because when I tried to write it in this way instead
function constructor() {
function() myFunc{
return "Hello World";
}
}
It does not work if it is bundled like function in a function. When I create an object of constructor, and then try to call the myFunc function.