These files are intended to be used with the JavaScript Console in Chrome.
The idea is that someone brand-new to programming could have this file open:
And along with the Console, type or copy/paste from that page to begin to understand:
- Variables
- Data Types
- Arrays
- Booleans and Comparisons
- if/else Statements
- for Loops
After that, this second file -- JavaScript Functions, also used in conjunction with the Console -- can help a newbie understand:
- Creating and calling a function
- Arguments
- Returns
- Scope
The order of examples follows Chapter 19 in Learning Web Design Fourth Edition A Beginner’s Guide to HTML, CSS, JavaScript, and Web Graphics, by Jennifer Niederst Robbins. The examples are my own, although they are aligned with examples given in the chapter.
A third file -- JavaScript Syntax Practice -- is also set up for practice using the console. It covers the following property, methods and functions:
length
substring()
toString()
parseInt()
isNaN()
Math.random()
I chose these because they come up often in early programming exercises, and I thought it might be nice to corral them all in one place for easy reference.