Skip to content

Latest commit

 

History

History
124 lines (101 loc) · 3.37 KB

File metadata and controls

124 lines (101 loc) · 3.37 KB

16.03 Introduction to JavaScript

Topics

  • the JavaScript programming language
  • interpreted languages vs compiled languages
  • running JavaScript in the browser
  • running JavaScript using node
  • using console.log()
  • JavaScript values
  • different types of values
  • introduction to variables
    • let
  • variable declaration
  • the assignment operator
  • changing the value of a variable
  • the typeof operator
  • writing comments

16.03 Introduction to JavaScript

Topics

  • recap of primitive values
  • variables and constants
    • var
    • let
    • const
  • variable names
  • JavaScript expressions
  • literals
  • arithmetic operators
  • variable reassignment
  • template literals
  • string length
  • square bracket notation for strings

Resources

Week March 21 - 24

Topics

  • recap assignment operators: = += -= *= /= **=
  • string accumulation with +=
  • increment operator: ++
  • decrement operator: --
  • escaping special characters in strings
  • comparison operators: === !== < > <= >=
  • boolean expressions
  • ternary operator: condition ? expressionIfTrue : expressionIfFalse
  • conditional expression

Basic String Methods

  • .toUpperCase(), .toLowerCase()

  • .substring()

  • .slice()

  • .includes()

  • .trim()

  • parseInt()

  • parseFloat()

  • Rounding up with Math.ceil()

  • Rounding down with Math.floor()

  • Getting random numbers with Math.random()

  • Maximum and minimum with Math.max(), Math.min()

  • NaN, typeof NaN

  • isNaN(<expression>)

  • Very long numbers: e, rounding errors

  • Rounding errors: .toFixed()

  • Infinity

Logical Thinking

  • Simple preposition analysis
  • Logical operators:
    • logical AND: &&
    • logical OR: ||
    • logical NOT: !
  • Truthy and falsy values: false, undefined, null, 0, ''
  • Short circuit assignment with ||

Array:

  • Assigning array literals: const <array name> = [<value 1>, <value 2>, ...]
  • Accessing array items with square brackets
  • Re-assigning array items with square brackets
  • consts and array items

Basic Array methods

  • Finding Items: Array.prototype.indexOf(<item>)
  • Adding items: Array.prototype.push(), Array.prototype.unshift()
  • Removing items: Array.prototype.pop(), Array.prototype.shift()
  • Manipulating arrays: Array.prototype.reverse()

Topics

  • recap assignment operators: = += -= *= /= **=
  • string accumulation with +=
  • increment operator: ++
  • decrement operator: --
  • escaping special characters in strings
  • comparison operators: === !== < > <= >=
  • boolean expressions
  • ternary operator: condition ? expressionIfTrue : expressionIfFalse
  • conditional expression

Basic String Methods

  • .toUpperCase(), .toLowerCase()
  • .includes()
  • .trim()
  • .substring()
  • .slice()