1001 Head First HTML5 Programming — Study Log #2
Chapter 2. Introducing JavaScript and the DOM: A Little Code
- Variables are containers for holding values. JavaScript variables don’t have strict types, so any variable can hold a number, a string or a boolean.
scoops - DOM (Document Object Model)
- Declare a JavaScript variable using var.
- Number, boolean and string are primitive types.
- Boolean values are true and false.
- To repeat blocks of code, use a for or a while loop.
- To end a for or while loop, the conditional test must be false at some point.
- Get access to an element in your web page using document.getElementById.
- Use the innerHTML property of an element to change the element’s content.
Difficult!
Word list
- integer
- string
- execution