JavaScript Codecademy Notes

Introduction: getting started with programming

Editor

JavaScript uses:

Interactive JavaScript

▲ Top

Variables

▲ Top

Data types

There are five basic data types: number, string, Boolean, undefined, and null. These are often referred to as primitive data types.

Numbers data type

String data type

Boolean data type

Undefined data type

Null data type

Typeof

▲ Top

Conditional statements (if else, ternary, else if & switch)

Syntax

If else statements

Ternary operators

Else if statements

Switch statements

Nesting conditional statements

Or operator in conditional statements

And operator in conditional statements

▲ Top

Looping

For loop

While loop

Recursive loops

For-in loop

▲ Top

Functions

Defining functions

Variables in functions

Passing parameters to a function

Return and branching in functions

Calling a function within code

Recursion (calling a function within that function)

Return values

Multiple parameters

▲ Top

Arrays

Using a function with an array

▲ Top

Objects & methods

Objects

String objects

Methods

Using objects with an array

▲ Top

Object-oriented programming

Classes

Inheritance in OOP

Public & private properties & methods of objects

▲ Top

Miscellaneous

▲ Top