This repository has been archived by the owner on Jun 24, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The first JavaScript lesson in the canonical curriculum covers a lot of ground. This pull request breaks that lesson in two, with variables introduced in the second of the two.
The first lesson focuses on the concept of expressions, which are defined as pieces of code that produce a value. I suspect that this idea is so intuitive to experienced programmers that we forget how foreign it is to novice students. Without a solid understanding of expressions, much of what comes later is incomprehensible: using variables, the return value of functions, etc. all rely on the concept that a piece of code often represents a value that is not literally written in the code.
So, I think it’s worth taking a really slow roll.
The second lesson covers variables, but within the conceptual framework of expressions and values that was introduced in the first lesson.
A few notes:
console.log
from the lessons. In my experience,console.log
is a source of tremendous confusion for the students, at least if it’s introduced early on. The median student in my class last year never grasped the difference betweenconsole.log
and doing actual manipulation of the page.