Project 2 is assigned today |
Take out a sheet of paper and stow everything else, including phones, CD players, calculators, computers, books, notes ... |
Answer All Questions: | |
1. Give an JavaScript assignment statement that adds 1 to variable y. | |
2. Write one million as a JavaScript number. | |
3. What is the result JavaScript expressions: | |
a) 5 + 5 | |
b) '8' + '9' | |
c) 1 + '5' |
The best way to learn programming is to try it |
Step 1. Build HTML structure and first command. Check | ||
Begin by inputting a number |
When programming the action for event handlers, always ask, “What do I want to happen on this event?” | ||
In this case, get the value out of the x1 window, add 2 to it and put the result into the x2 window for display. | ||
x2.value = x1.value + 2 | ||
or | ||
onChange=" x2.value = x1.value + 2" |
JavaScript is processed while browser is parsing the HTML, i.e. figuring out the command’s structure |
document.write( ) puts HTML on page | |
Four Parts | |
a) Exercise with Memory Bank | |
b) Create brown keys | |
c) Create white pattern | |
d) Generate pattern & finish | |