motlhophisi
→ constructorThe special method that initializes new class instances.
motlhophisi(diparamethara) { ... }Define a motlhophisi inside a mofutakwalo block to set up the initial state of every new instance created with dira.
Examples
Section titled “Examples”mofutakwalo Sediko {
motlhophisi(r) {
ye.r = r;
}
}