Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| p5js-week-12 [2022/07/16 08:03] – renick | p5js-week-12 [2023/06/29 23:02] (current) – reina.chen | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| (photo from https:// | (photo from https:// | ||
| - | Last time, we looked at if-statements and used them to check a toaster. Remember, here's the basic pattern for an if statement: | + | Last time, we looked at <color black/ |
| if () {} else {} | if () {} else {} | ||
| Line 24: | Line 24: | ||
| ====== using else ====== | ====== using else ====== | ||
| - | We use " | + | We use <color black/ |
| toasterPluggedIn = "i forgot" | toasterPluggedIn = "i forgot" | ||
| Line 77: | Line 77: | ||
| ====== using else if ====== | ====== using else if ====== | ||
| - | Sometimes we have more than one condition; in those cases, we can continue to use new " | + | Sometimes we have more than one condition; in those cases, we can continue to use new " |
| We can modify our basic if-statement reference to include else if like this: | We can modify our basic if-statement reference to include else if like this: | ||
| Line 87: | Line 87: | ||
| ===== the includes method ===== | ===== the includes method ===== | ||
| - | To do that, let's learn a new JavaScript method called " | + | To do that, let's learn a new JavaScript method called " |
| "some delicious toast for breakfast" | "some delicious toast for breakfast" | ||
| Line 157: | Line 157: | ||
| Be sure to post your drawing to your wiki page. | Be sure to post your drawing to your wiki page. | ||
| + | |||
| + | ===== conclusion ===== | ||
| + | |||
| + | This is also the end of our course. I hope you've enjoyed thinking about toast, JavaScript, and p5js with us. Please keep drawing with code, and be sure to share your progress with us! | ||
| + | |||