zlox/samples/ch28_methods_again.lox

13 lines
175 B
Plaintext
Raw Normal View History

2024-08-31 11:32:05 +02:00
class Brunch {
bacon() {
print "calling bacon()";
}
eggs() {
print "calling eggs()";
}
}
var brunch = Brunch();
print brunch;
brunch.bacon();