Category:

  • Scripting Language

Progression

ID Status Learning Item Type Related Project Date Completed
1 Up next Learn JavaScript Course
2 Not Started The Odin Project - Full Stack Javascript Course
3 Not Started Eloquent Javascript - A Modern Introduction to Programming Book
4 Not Started You Don't Know JS Yet (2nd edition) Book
5 Not Started You Don't know JavaScript Book
6 Not Started JavaScript - The Right Way Book
7 Not Started JavaScript - Understanding the Weird Parts Course
8 Not Started Learn ES6 (ECMAScript 2015) Course
9 Not Started Watch and Code - Practical Javascript Course
10 Not Started Asynchronous JavaScript Requests Course
11 Not Started Javascript30 Course
12 Not Started Get Job ready - JavaScript Edition Course
13 Not Started 33 concepts every JavaScript developer should know Course
14 Not Started The Complete JavaScript Handbook Book
15 Not Started JavaScript clean code guide Book
16 Not Started DOM Enlightenment Book
17 Not Started The Modern JavaScript Tutorial Course
18 Not Started Modern JavaScript Explained for Dinosaurs Course

Introduction

JavaScript is huge, and as such, trying to compile my notes on EVERYTHING here is probably way out of scope for a blog like this. I will try to reduce my notes to bite-sized pieces of information that could ideally help someone who ends up here get moving in the right direction.

Variables

Declarations

  • const
  • let
  • var (although var should be avoided in favor of const or let)

Data Types

  • undefined
  • null
  • boolean
  • string
  • symbol
  • bigint
  • number
  • object

All variables and function names are case sensitive. Best practice in JavaScript is to use camelCase to declare our variables, as such:

const someVariable;
const anotherVariableName;

Operators

i++; and i--; can be used to increment or decrement a variable by 1, with no direct assignment required.

“Augmented” operations are a term to modify a value by different quantity than 1 by combining an operator and equals, as shown:

let myVar = 1;
myVar = myVar + 4;   // 5

let otherVar = 1;
otherVar += 4;   // 5

Valid operators for this operation include + - * / and more.

% is referred to as “remainder” in JavaScript and not “modulus”. The operation is similar to modulus, but does not work properly with negative numbers.

Documentation

// In-line comment

/* Multi
line
comment */

/**
 * JSDoc comment
 * @see {@link https://jsdoc.app/|JSDoc Syntax}
*/

Strings

Strings can marked with " or '. To use quote marks within a string, you can either mix one set of quote symbols per level like 'They said, "Hello!" to the world.', or escape identical quotes with \, like "I am a \"double quoted\" string".

Single and double quotes are functionally identical in JavaScript.

The string datatype has a .length parameter exposed, and individual letters can be accessed like an array:

let myStr = "Test";
console.log(myStr[0]); // "T"

Arrays

Arrays can be flat, or nested to create multi-dimensional arrays:

let myArray = [1,2,3];

let myMultiDimArr = [[1,2,3],[4,5,6],[7,8,[9,10]]]

Arrays have a .push() method exposed that allows us to take one or more parameters and “push” them onto the end of the array (after the index array.length-1).

The .pop() method allows us to “pop” a value off the end of the array (at the index array.length-1) and assign it to a value.

let myPop = myArr.pop();

Similar to .pop(), .shift() removes the first element of the array (at index 0).

Resources