JavaScript Basics

If you have any questions (or if you just want to talk JavaScript), your cohorts forums are a fantastic way to get in touch with us and your classmates.

Need help getting started?


Course Resources

The Console

Chrome: go to View > Developer > JavaScript Console (here’s a guide)

FireFox: go to Tools > Web Developer > Web Console (here’s a guide)

IE11: go to Tools > Developer Tools > Console icon (here’s a guide)

Safari: turn on the Develop menu: Preferences > Advanced > Show Develop menu in menu bar go to Develop > Show Web Inspector (here’s a guide)

Developer Tools


  • Array: An ordered collection of elements of any type separated by commas. e.g. ["an", "array", "of", "strings", "and", 1, "number"]. JavaScript includes a number of array modification methods and properties, found here.
  • Control Flow: Control flow refers to statements used to decide whether or not to execute a set of statements. This course covers the most common: if statements. In their simplest form, if statements ask if a condition evaluates to true, and if so, it executes a set of commands. If the conditions are not met, an else statement contains the set of statements to execute otherwise. See the MDN for more on if statements and other control flow operators.
  • Encapsulation: The process of storing information or functions within an object. Related data and functions are often bundled together in objects that make logical sense. e.g. you might have a car object that encapsulates a startCar() method and an engineDescription object.
  • Function: Much like a math function, functions in JavaScript are packages of instructions that can be easily passed around and invoked (run) by referencing the function's name. Functions often take in parameters / arguments, which are data that will be manipulated by the instructions contained within the function. See the MDN for function methods and properties.
  • JSON: JavaScript Object Notation. JSON is a popular and simple format for storing nested data of any type (in fact, most other programming languages have libraries capable of parsing and writing JSON). Internet GET and POST requests frequently pass data in JSON format. JSON allows for objects (or data of other types) to be easily encapsulated within other objects. See the MDN or for more.
  • Loops: Loops make it easy to repeatedly execute code. This course covers a few common JavaScript loops: while, for, and for in. while loops will continually execute statements so long as some condition evaluates to true. for loops generally use iterators to determine the number of times to execute a set of statements. for in loops execute a set of statements over all of the (enumerable) properties of an object. See the MDN for more on loops.
  • Number: A simple data type. Automatically saved as 64-bit floating point. Numbers do not require quotes. e.g. 1 or 3.14. JavaScript includes a number of number methods and properties, found here.
  • Object: As Cameron says in the course, objects hold information and do things. Objects are a multipurpose data type, capable of storing any amount of any data type, nesting data, and encapsulating functions. In fact, almost everything in JavaScript is an object, even if it doesn't look like one. See the MDN for object methods and properties.
  • String: A simple data type. A set of any number (>= 0) of characters between quotes. e.g. "this is a string" or an empty string, "". JavaScript includes a number of string modification methods and properties, found here.
  • Variable: A piece of data that is saved with a unique name. The syntax is var variableName = someData;. Any type of data, from strings to functions and objects, can be saved as a variable. All new variables are declared with var, regardless of the type, followed by the variable name and an equal sign. Whatever is on the right side of the equal sign will be saved to that variable name and can be referenced later by that name.


Lesson 1: Getting Up and Running

Learn about the tools we'll be using throughout the course and begin modifying web pages with a little bit of code.

  • Introduction of résumé project
  • Components of the résumé
  • Introduction to browser developer tools
  • Running commands on the console
  • Appending elements to the page

Lesson 2: Data Types

Dig deeper into JavaScript as we introduce you to the building blocks of the language as you write more complex code using variables and advanced data structures like JSON, Objects, and Arrays.

  • Variables
  • Strings
  • Evaluating values
  • Arrays
  • Objects
  • JSON
  • Validating JSON

Lesson 3: Flow Control

Finish the résumé while you learn how to make your code more modular and reusable by using conditional statements, loops, and functions.

  • Conditional statements
  • For and while loops
  • Functions
  • Encapsulation