V School | Better Humans, Better Outcomes

Arrow Functions

Arrow functions simplify the syntax of our traditional functions. They use symbols that make intuitive sense to help make our functions simpler. The old way of writing functions: const add = function(a, b){ return a + b; } With arrow functions, we can remove the function key word, and add an arrow

Import/Export

Before we would require npm packages or other files from our project. Now, we use the import syntax. import axios from 'axios'; Is the same as saying const axios = requre('axios'); We can also "unpack" only the methods or items that we need from the package or file. import { Component

Destructuring

As we've found, the easiest way to learn the new ES6 syntax is to see the old way of writing JavaScript. const expense = { type: "Business", amount: "$45 USD" }; const type = expense.type; const amount = expense.amount; ugh. So much redundancy! We have const, type, and amount written three times. Using

Object Literals

Object literal syntax is just a way to make our code look nicer. To show how to use this, we will just look at the old/uglier way of doing things, and then see the ES6/prettier way of doing things. There are three major ways object literals do this.

Template Literals

These are designed for making our strings easier to read and write. They utilize the "back tick." This symbol -> `. It's just left of the "1" on your keyboard. We put our entire string inside two back ticks, and we use a dollar sign and curly brackets to insert JavaScript

V School | Better Humans, Better Outcomes © 2026