-
Notifications
You must be signed in to change notification settings - Fork 4
Session #7 Back to the basics
Seth McLaughlin edited this page Jun 6, 2014
·
4 revisions
- Slides: http://www.slideshare.net/sethmcl/chapter-1-communicating-with-your-computer
- Video: https://www.youtube.com/watch?v=Ps03yn2XlUw
- Repl.it: http://www.repl.it (choose JavaScript)
- Homework: Directions for submitting homework
Write a JavaScript expression which adds 5 to 10. This expression should evaluate to 15.
Define three variables. One should hold your age, one should hold your favorite number, and one should hold the number of siblings you have.
Next, define a new variable which stores the result of adding the previous three variables together.
Define a variable to hold the number of hours in a day.
Multiply this value by 7 to get the number of hours in a week. Assign this to a new variable.
Next, multiply this by the number of weeks in a year (52) and assign the result of this in a new variable.
Finally, divide this number by the number of days in a year (365). What is the result?