Files
pebble/examples/basic/17_class.peb

16 lines
224 B
Plaintext

class Breakfast {
cook() {
print("Frying some eggs")
}
serve(who) {
print("Enjoy your breakfast, " + who + ".")
}
}
print(Breakfast)
let bf = Breakfast()
print(bf)
bf.cook()
bf.serve("Bob")