1 JavaScript Topics: Readings and References

  • Formally referred to as ECMAScript the standard are available at Standard ECMA-262: ECMAScript® 2018 Language Specification. Section 4, overview, presents a good summary, however, even this is aimed more at language implementers rather than application authors.
  • Our required JavaScript textbook will be MDN’s JavaScript Guide. MDN has more tutorials and advanced material on JavaScript. Another reference that you may find helpful is Exploring ES6.

We’ll be using two environments to run JavaScript: (1) Web Browser, (2) Node.js for the server side of things.

2 JavaScript Language

  1. JavaScript History from a standards perspective. We’ll be using the version known as ES6, aka ES2015 and some ES2017 features such as async/await.

  2. Introduction. Covers JavaScript history (short), relation to Java, JavaScript/ECMAScript, Web Console.

3 Grammar and Types

Grammar and types. Topics include:

  • Case sensitive, Unicode,
  • Variables, declarations, scope, global variables, hoisting, function hoisting, constants.
  • Data types: Primitives- Boolean, null, undefined, Number, String, Symbol; Object.
  • Type conversion, strings to numbers.
  • Literals: Arrays, Boolean, Floating point, Integers, Object, RegExp, String.

4 Control flow and error handling

Control flow and error handling. Topics include:

  • “;” as a statement separator, block statements
  • Conditional statements, “falsey values”, Switch statements
  • Exception handling statements, exception types, throw statement, try/catch statement.
  • Promises (we’ll cover these a bit later in the course)

5 Loops and iteration

Loops and iteration. Topics include:

  • for, do/while, and while statements
  • break and continue statements
  • for…in statement, for…of statement

6 Functions

Functions. Topics include:

  • function declarations and expressions, primitives pass by value, objects pass by reference.
  • function scope, nested functions and closures
  • arguments object, parameters, default parameters, rest parameters.
  • arrow functions, predefined functions

6.1 Dealing with this

7 Expressions and Operators

Expressions and operators. Topics include:

  • assignment, comparison, arithmetic, bitwise, logical, and string operators.
  • conditional (ternary) operator, comma, unary (delete, typeof), relational operators (in, instanceof), operator precedence.
  • Primary expressions (this, grouping, comprehensions), left hand-side expressions (new, super, spread)

8 Numbers and Dates

Numbers and dates. Topics include:

  • decimal, binary, octal, hexadecimal, exponentiation (scientific notation)
  • Number object: Lots of good stuff including min/max limits, NaN, machine epsilon,
  • Methods of Number: parseFloat(), parseInt(), isFinite(), isInteger(), isNaN(), isSafeInteger()
  • String conversion/formating: toExponential(), toFixed(), toPrecision().
  • The Math object: here is where you will find all the functions!
  • Date object

9 Text Formatting and Processing

Text formatting. Topics include:

  • A survey of the very helpful string functions that you shouldn’t be re-writing!
  • Multi-line template literals (new)
  • Regular Expressions

10 Indexed and Keyed Collections

  • Indexed collections. Topics include:

    • Basic usage and iteration
    • Array methods: search like, combination, stack like
    • Array methods functional: forEach, map, filter, every, some
  • Keyed collections. Maps and Sets. Don’t write your own! Will probably not cover weak maps and sets.

11 JavaScript Objects and Classes

11.1 Working with Objects

Working with objects. Important! Topics include:

  • Objects and properties, enumeration of properties
  • Creating new objects: initializers, constructor function, Object.create()
  • Inheritance, prototype, defining properties, defining methods
  • Using this for object references

11.2 JavaScript Classes

MDN reference on Classes.

11.3 Objects and Prototypes

  • Details of the object model. Discusses the differences between a class based and prototype based languages. Compare Java and JavaScript in a inheritance hierarchy example.

Extra references:

12 Promises and Async/Await