Loading...
November 1, 2022: Javascript 2
Discussion
Link
shared by
The Battle for the Soul of the Web
Taichi
In-Class Demo
2022-11-02_class-js-demo
Notes
This contains a .js file with comments that you can read for explanations.
You can also see the code in the demo-library, as Demo #15.
2022-11-02_js-notes
Review
Declaring a variable
Boolean —
var leapYear = false
Number —
var year = 2021
String —
var month = November
Re-assigning
(changing)
a variable
year = 2022
Operations
Expressions
Expressions that evaluate to a boolean
month == 'November'
evaluates to
true
Expressions that evaluate to a number
2022 + 1
evaluates to
2023
Expressions that evaluate to a string
Next Week
Learning
Review
Date
What really are objects?
Logic
(if/then,
and/or)
Maybe discuss:
“The
Battle for the Soul of the Web”
Possible ideas:
Create a page that is like an oracle or a fortune-teller, but it’s really just randomness.
Create a clock page using the
Date object
Create a page that gives you a random link to another page on your website, or on the internet.
Create a page that displays something different depending on the day
(Monday,
Tuesday, etc.)
Upload to Canvas
Upload it to Github and add the link below! I have to start having something to grade.
Please turn on JavaScript to use Paper in all of its awesomeness. ^_^
Discussion
In-Class Demo
Notes
Review
Upload it to Github and add the link below! I have to start having something to grade.