xxxxxxxxxx
25
class SomeClass
{
constructor()
{
this.OnePropertyOfThisClass = true;
this.AnotherPropertyOfThisClass = false;
this.YetAnotherProperty = "lorem ipsum dolor sit amet";
this.OneFinalPropertyThatThisClassHas = 3.14159;
}
Speak()
{
for (const propertyName in this)
print(`${propertyName} : ${this[propertyName]}`);
}
}
function setup()
{
let foo = new SomeClass();
foo.Speak();
}