Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| intro-to-javascript-wokshop [2024/06/29 22:55] – renick | intro-to-javascript-wokshop [2025/03/06 17:43] (current) – renick | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Introduction to JavaScript Workshop ====== | ====== Introduction to JavaScript Workshop ====== | ||
| + | |||
| + | ===== hello world ===== | ||
| + | {{: | ||
| + | |||
| + | Are you feeling like this about programming? | ||
| + | |||
| + | We'll do this today. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | At the end of this hour, you;ll feel like this! | ||
| + | |||
| + | {{: | ||
| + | |||
| + | This webpage can be found at this QR code, or go to my website and search javascript-workshop. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | <code JavaScript [enable_line_numbers=" | ||
| + | console.log(' | ||
| + | </ | ||
| + | |||
| + | ===== calculator ===== | ||
| ===== mess with images on a webpage ===== | ===== mess with images on a webpage ===== | ||
| - | < | + | < |
| function replaceImagesWithUrl(url) { | function replaceImagesWithUrl(url) { | ||
| // Get all img elements in the document | // Get all img elements in the document | ||
| Line 19: | Line 42: | ||
| ===== mess with text on a webpage ===== | ===== mess with text on a webpage ===== | ||
| - | < | + | < |
| function replaceSpanText(newText) { | function replaceSpanText(newText) { | ||
| // Get all span elements in the document | // Get all span elements in the document | ||
| Line 32: | Line 55: | ||
| </ | </ | ||
| - | ===== remember: | + | ===== p5js ===== |
| - | https://i.imgflip.com/5syjfo.png?a476952 | + | https://editor.p5js.org/ |
| + | |||
| + | ===== term dump ===== | ||
| + | < | ||
| + | ( ) parentheses, | ||
| + | { } curly brackets, curly braces | ||
| + | ' ' | ||
| + | " " double quotes | ||
| + | , comma | ||
| + | . period, dot | ||
| + | - dash, hyphen | ||
| + | _ underscore | ||
| + | / slash | ||
| + | \ backslash | ||
| + | argument = the input to a function | ||
| + | call a function = use a function, make it do what it's intended to do | ||
| + | put the argument between the parentheses when you call a function | ||
| + | declare a function | ||
| + | return = the value that a function returns or gives back when it is called | ||
| + | string = text data which is determined by a pair of quotes, single or double | ||
| + | variable = a box with a name in which we can store things | ||
| + | </ | ||