1
2
3
 
b = Button();
hi = function () {print("hi!");}
b.onclick(hi);
Output