Slide 52
Slide 52 text
...now for humans
1. function throwAndCatchBetween(person1, person2) {
2. // person1 starts with ball
3. addBall(person1);
4.
5. // wait while they get ready to throw
6. setTimeout(() => {
7.
8. // person1 throws ball
9. removeBall(person1);
10.
11. // ball travels through the air
12. setTimeout(() => {
13.
14. // person2 catches ball
15. addBall(person2);
16.
17. // Back again!
18. throwAndCatchBetween(person2, person1);
19.
Ball flies throught the air for 1 second before being
caught.