Essential JavaScript

Mini Projects

Object Destructuring

Practice extracting properties from objects into distinct variables using modern ES6 syntax.

  • Nested destructuring
  • Default values
  • Function parameters
View Project

The .map() Method

Master the art of transforming arrays without mutating the original data.

  • Array transformation
  • Functional programming
  • React preparation
View Project

The Dangers of innerHTML

Understand the security risks associated with directly injecting HTML strings.

  • XSS vulnerabilities
  • textContent vs innerHTML
  • Sanitization basics
View Project

Arrow Functions

The arrrow method is a concise way to write functions in JavaScript. It converts traditional functions to concise arrow syntax and understand `this` binding.

  • Implicit returns
  • Lexical scoping
  • Code brevity
View Project

Import/Export Modules

In this lesson, we learn how to modularize your JavaScript code using ES6 modules. Import and export statements help organize and reuse code efficiently.

  • Named exports
  • Default exports
  • Module organization
View Project

Array .reduce() method

Learn how to use the .reduce() method to perform cumulative operations on array elements.

  • Array transformation
  • Finding recent dates
  • Eleminate duplicates
  • Code brevity
View Project

Super Challenge Set-up

The Challenge target is to combine multiple JavaScript concepts into one project. By using what we have learned so far, including and not limted to the following:

  • import/export
  • .map()
  • .join()
  • Object destructuring
  • .reduce()
View Challenge

The Ternary Operator

The ternary operator is a concise way to perform conditional expressions in JavaScript. It is not a replacement for if-else statements but offers a shorter syntax for simple conditions.

  • Concise syntax
  • Conditional expressions
  • Inline decisions
View Project

The Rest Parameter

The rest parameter syntax allows a function to accept an indefinite number of arguments as an array. It is represented by three dots (...) followed by the name of the array that will hold the arguments.

  • Indefinite arguments
  • Array collection
  • Function flexibility
View Project

The Spread Operator

The spread operator allows an iterable such as an array or string to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected. It is represented by three dots (...).

  • Merging arrays
  • Copying arrays
  • Spreading strings
View Project

Short Circuiting OR (||)

The OR operator (||) evaluates operands from left to right and returns the first truthy value it encounters. If all values are falsy, it returns the last value.

  • Evaluating from left to right
  • Returning the first truthy value
  • Returning the last value if all are falsy
View Project

Short Circuiting AND (&&)

The AND operator (&&) evaluates operands from left to right and returns the first falsy value it encounters. If all values are truthy, it returns the last value.

  • Evaluating from left to right
  • Returning the first falsy value
  • Returning the last value if all are truthy
View Project

Switch Statements

Switch statements are used to perform different actions based on different conditions. They are an alternative to using multiple if...else if...else statements when you need to compare the same variable or expression against multiple possible values.

  • Multiple conditions
  • Case matching
  • Default case
View Project

Constructors: Date()

The Date() constructor is used to create Date objects in JavaScript, which represent points in time. Date objects allow you to work with dates and times, including getting the current date and time, manipulating dates, and formatting date and time values.

  • Create Date objects
  • Get current date and time
  • Manipulate and format dates
View Project

Constructors: Error()

The Error() constructor is used to create error objects in JavaScript. These objects represent runtime errors and provide information about the error, such as its name and message. Error objects can be thrown and caught using try...catch statements to handle errors gracefully in your code.

  • Create Error objects
  • Custom error messages
  • Error handling with try...catch
View Project

Objects with Methods and 'this'

Objects with methods allow you to define functions inside objects that can operate on the object's properties. The this keyword inside these methods refers to the object itself, enabling access to its properties and other methods.

  • Defining methods in objects
  • Using this to access properties
  • Object-oriented programming
View Project

Object Constructor

An Object() constructor is used to create an object wrapper for a given value. It can be used to create objects with specific properties and methods.

  • Custom object creation
  • Instance properties and methods
  • Using the new keyword
View Project

Constructor Functions to Classes

Classes in ES6 provide a clearer and more concise syntax for creating constructor functions and dealing with inheritance in JavaScript.

  • Class syntax
  • Constructor methods
  • Inheritance with extends
View Project

Debugging: Errors

Debugging is the process of identifying and fixing errors or bugs in your code. Understanding common error types and how to use debugging tools can help you write more reliable and maintainable JavaScript applications.

  • Common error types
  • Using console.log()
  • Debugging tools
View Project

Debugging: Try...Catch

Learn how to use try...catch blocks to handle errors gracefully in your JavaScript code, improving the robustness and user experience of your applications.

  • Try...catch syntax
  • Error handling
  • Finally block
View Project