Follow along: https://bit.ly/2WtAGDJ
Assumptions
Why?
Math Review
Assigning Variables in (Javascript) Code is like Math!
Making One String from Two Strings.
Creating your own!
What did we do today?
What We're Covering
Why?
Math Review
Assigning Variables in (Javascript) Code is like Math!
Making One String from Two Strings.
Creating your own!
What did we do today?
You should know the following:
What We're Covering
Assumptions
Math Review
Assigning Variables in (Javascript) Code is like Math!
Making One String from Two Strings.
Creating your own!
What did we do today?
Your Work
Your free time
94% of Alberta is on the internet (2017)*
Have you ever thought about how these things work?
They're all written in code.
You're going to write some code today.
*https://www150.statcan.gc.ca/n1/pub/11-627-m/11-627-m2017032-eng.htm
What We're Covering
Assumptions
Why?
Assigning Variables in (Javascript) Code is like Math!
Making One String from Two Strings.
Creating your own!
What did we do today?
What We're Covering
Assumptions
Why?
Math Review
Making One String from Two Strings.
Creating your own!
What did we do today?
You should see something like the image on the right pop up.
var x = 1;
var y = "the"; var z = "hat";
Looks pretty similar right?
"var" is letting a special word in the language to create the variable. If we reassign a variable then we don't need this word.
The assignment is different from text, and a number
";" is used to end every line (or statement).
What We're Covering
Assumptions
Why?
Math Review
Assigning Variables in (Javascript) Code is like Math!
Creating your own!
What did we do today?
var y = "the";
var z = "hat";
var result = y + " cat in the " + hat;
Looks pretty similar right?
Concatentating strings is basically adding strings together.
What We're Covering
Assumptions
Why?
Math Review
Assigning Variables in (Javascript) Code is like Math!
Making One String from Two Strings.
What did we do today?
Reach assessment: create two variables that are numbers and add them together.
Marshmallow
Ghost
Gambit