Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The concept of assignment using an equals sign #17

Closed
theophani opened this issue Jul 20, 2012 · 3 comments
Closed

The concept of assignment using an equals sign #17

theophani opened this issue Jul 20, 2012 · 3 comments

Comments

@theophani
Copy link
Member

On page 1, Line 155 this statement is made:

“The above program introduces two new concepts: the semicolons, and the use of var.”
https://github.com/OpenTechSchool/js-beginners-day1/blob/master/page1.html#L155

However, the program also introduces assignment using an equals sign. The concept is assumed to be understood in the paragraph that begins on Line 168:
https://github.com/OpenTechSchool/js-beginners-day1/blob/master/page1.html#L168

Can we add a step (or a remark in this step) about = being used to set a value?

@theophani
Copy link
Member Author

Credit: This suggestion was inspired by http://andy.wordpress.com/2012/05/30/programming-is-not-algebra/, which hit on a confusion I certainly had as a beginner.

@marijnh
Copy link
Member

marijnh commented Jul 20, 2012

The concept is assumed to be understood in the paragraph that begins on Line 168:

The way I intended it, that paragraph explains the concept, rather than assuming it to be understood.

What do you find unclear about the explanation?

@theophani
Copy link
Member Author

Hrmm, perhaps I'm reading too little into the line. In my mind, it implies that = assigns values without granting that the concept is new.

The sentence for reference:
“The = operator can be used at any time to give it a new value, as in the third line of the example.”

I was thinking something such as changing the intro to “introduces three new concepts: the semicolons, the use of var, and the = operator” to hint that while the = looks familiar, it acts differently than you may expect. The only change needed later would be: “to give variables new values”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants