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

<
Previous Post
0930 Read many articles and wrote a summary of September
>
Next Post
1001 Thought about my life