Structured Programming with JavaScript
Prelude
Intended reader
How to read (and code)
Colophon
1
Introduction
1.1
Structured programming
1.2
The goal of this book
1.3
How to learn
1.4
Short tips
2
Your first time with JavaScript
2.1
A brief story about JavaScript
2.2
How to run JavaScript in the web browser
2.3
VSCode installation
2.4
Node.js
installation
2.5
Running Javascript program in
Node.js
2.6
Short tutorial of using Markdown
Exercise
3
Lexical Structures
3.1
Case sensitivity, spaces, and line breaks
3.2
Comments
3.3
Literals
3.4
Identifiers and Reserved Words
3.5
Unicode
3.6
Optional semicolons
Exercises
4
Types, Values and Variables
4.1
Some important terms in types
4.2
Types: Number
4.3
Type: Text
4.4
Type: Boolean
4.5
Special type:
null
and
undefined
4.6
Type: Symbols
4.7
Value: Global object
4.8
Type conversions
4.9
Variable declaration and assignment
Exercises
5
Expressions and Operators
5.1
Primary expression
5.2
Operators
5.3
Arithmetic expression
5.4
Relational expression
5.5
Logical expression
5.6
Assignment expression
5.7
Miscellaneous operators
Exercises
6
Statements
6.1
Expression statements
6.2
Compound and empty statements
6.3
Conditionals
6.4
Iteration (loops)
6.5
Jumps
6.6
Miscellaneous statements
Exercises
7
Objects
7.1
Creating an object
7.2
Querying and setting of a property
7.3
Deleting a property
7.4
Testing the existence of a property
7.5
Enumerating object
7.6
Extending objects
7.7
Serializing objects
7.8
Built-in object methods
7.9
Additional syntaxes for literal objects
Exercises
8
Playing around with JavaScript Progam
9
Arrays
9.1
Creating an array
9.2
Reading and writing elements of an array
9.3
Creating a sparse array
9.4
Determining the length of an array
9.5
Adding and removing elements of an array
9.6
Performing iteration to an array
9.7
Multidimensional array
9.8
Some useful methods in an array
9.8.1
Array iterator methods
9.8.2
Methods for creating stacks and queues
9.8.3
Methods on subarrays
9.8.4
Array searching and sorting methods
9.9
Objects that is similar to array
9.10
Thinking a string as an array
Exercises
10
Functions
10.1
Some basics terminology in JavaScript's function
10.2
Function declaration
10.3
Function invocation
10.4
Function arguments and parameters
10.5
Function as values
10.6
Functional programming
Exercises
11
JavaScript Standard Library
11.1
Sets and Maps
11.2
Pattern Matching with Regular Expression
11.3
Dates and Times
11.4
Timers
Exercises
12
Asynchronous Programming in JavaScript
12.1
Understanding the principle of asynchronous programming
12.2
An example of asynchronous program
12.3
Introduction to Promise object
12.4
Some practical use of Promise object
Exercises
13
JavaScript in Web Browser: Tic-Tac-Toe and React
13.1
Setup environment
13.2
Short overview of Tic-Tac-Toe program and React
13.3
Finishing the base program of Tic-Tac-Toe
13.4
Additional features: “Time travel” for player’s steps
Exercises
14
JavaScript in Web Browser: Geospatial plot and D3.js
14.1
D3.js installation
14.2
Working with data
14.3
Drawing with data
14.4
Making Balikpapan administration district map
Exercises
15
JavaScript in Web Browser: Learning animation
References
Structured Programming with JavaScript
References