zlox/samples/ch28_calling_methods.lox

10 lines
192 B
Plaintext

class Scone {
topping(first, second) {
return "scone with " + first + " and " + second;
}
}
var scone = Scone();
var result = scone.topping("berries", "cream");
print result;