1//you can either do this:
2
3function mousePressed() {
4 //you can have any message
5 alert("I'm the best");
6}
7
8//or you can do this:
9
10function keyPressed() {
11 //you can do any key
12 if (keyCode === UP_ARROW) {
13 //and any message
14 alert(number = random(0, 500));
15 }
16}
17
18//or you can do an (if) statement
19
20if(x > width) {
21 alert("yay you did it");
22}