The building blocks of programming
We start from words
words to make phrases
phrases to make sentences
sentences to make paragraphs
paragraphs to make essays and books
We start with basic values
Numbers, booleans, strings, and others.
And operators
+
, -
, *
, /
, %
, &&
, []
, etc.
let students = 29
students
⟹ 29
We’ll discuss those as they come up
values to make expressions
expressions to make functions
functions to make libraries
libraries to make programs
2 * 10
a * 10
We don’t know exactly what value this expression will produce
But we know what type of value it will be: a number.
We frequently combine expressions to make more complex expressions
grade1 + grade2
(grade1 + grade2) / totalPoints
100 * (grade1 + grade2) / totalPoints
Be able to …
Translate from English to expressions
Understand the “meaning” of expressions in code
Identify the type of value an expression produces