2
Why when I declare method in a class the compiler beeps, stating that the word usage is wrong function
.
In previous lessons of my learning to create a function I signed first as function
.
abstract class Empregado {
abstract getFuncao():string;
}
class Professor extends Empregado {
getFuncao():string {
return "Professor";
}
}
class Diretor extends Empregado {
getFuncao():string {
return "Diretor";
}
}
Interesting! As you mentioned, I answered, but it was a curiosity, IE, Function is more for
scripts
procedural level.– Macario1983
@Macario1983
– Maniero