What I did (in code):
const monthlyRent = 500
const yearlyRent = monthlyRent * 12
console.log(yearlyRent)
Logs: 6000
What I did (in English):
- I declared a
const
variable calledmonthlyRent
and stored in it (i.e., gave it the value of)500
. - I declared a
const
variable calledyearlyRent
and stored in it (i.e., gave it the value of)monthlyRent * 12
. - I logged to the console
yearlyRent
.
What I practiced:
- Same as above.
What I learned:
- From the above code, I didn't learn anything new.
- From other parts of this section of instruction, I learned that...
...the goal is to make our code self-describing, meaning it reads like it executes, and that we're writing code mainly so that we can maintain it in the future
...when we use the console to experiment, we're using it as a "repl" and that "repl" stands for "read-evaluate-print-loop"
...JS is called a "single-threaded" language because it can only do one thing at a time, whereas languages like Java can run things concurrently
What I still might not understand:
- Nothing for this section.
Top comments (0)