Skip to content

Commit

Permalink
Fixed minor typos and added an explanation about the logical NOT oper…
Browse files Browse the repository at this point in the history
…ator.
  • Loading branch information
jdennes committed Apr 27, 2013
1 parent 9e6d96a commit 5d599e9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h1>Curriculum: second day</h1>

<p>Today, our goal is to learn how JavaScript can create and edit the
content and appearance of a web page. When we use our awesome
Javascript power to change the content or its appearance, we can make
JavaScript power to change the content or its appearance, we can make
text, shapes and pictures appear, disappear and move around. The
content is HTML, and the appearance is described in CSS.</p>

Expand Down
4 changes: 2 additions & 2 deletions page1.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h3 class=inst>Instructions</h3>

<h3 class=ex>Explanation</h3>

<p>No where in this HTML page have we said how big to make the
<p>Nowhere in this HTML page have we said how big to make the
heading, that text in <code>&lt;strong></code> tags should be bold,
that <code>&lt;em></code> should be italic, that there should be space
above and below <code>&lt;p></code> tags.</p>
Expand Down Expand Up @@ -155,7 +155,7 @@ <h3 class=ex>Explanation</h3>
<h2>More JavaScript please!</h2>

<p>There is a lot to learn about both HTML and CSS, but hopefully
that’s enough of an introduction will help us so we add our magic
that’s enough of an introduction to help us as we add our magic
power: JavaScript!</p>


Expand Down
14 changes: 11 additions & 3 deletions page3.html
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,17 @@ <h3 class=ex>Explanation</h3>

<p>We created a variable that remembers whether or not we are already
scrolling, and if we are, we ignore the keydown event from the
user. Maybe this is not what the user expects. What is reasonable for
the user to expect? How can we change the code to do what the user
expects?</p>
user.</p>

<p>You will notice that this solution uses an exclamation mark in the
<code>if (!scrolling)</code> conditional statement (inside the
<code>handleEvent</code> function). The exclamation mark is called the logical
NOT operator in JavaScript, so the <code>if (!scrolling)</code>
conditional statement has the meaning "if the scrolling variable is not true".</p>

<p>Maybe this solution to the problem does not fit with what the user expects. What is
reasonable for the user to expect? How can we change the code to do what the
user expects?</p>


<h2>Next!</h2>
Expand Down

0 comments on commit 5d599e9

Please sign in to comment.