Browse all JavaScript lessons.

showing All 496 lessons...

Using GraphQL's GraphiQL Tool

Logging Pretty-Printing Tabular Data to the Console

P

Logging Timing Data to the Console

P

Using console.count to Count Events

P

Proper use of console.assert in JavaScript

P

Grouping and Nesting Console Log Output

P

Advanced Console Log Arguments

P

Log Levels and Semantic Methods

P

Up and Running with Facebook Flow for Typed JavaScript

P

Add a browser build to an npm module

Maps and WeakMaps with ES6

Add Elements onto an Array with Push

Getting Started with Redux Dev Tools

Promises with ES6

Refactoring tip: no empty lines inside a function

P

Getting a Pull Request Merged and Wrapping up

How to squash multiple git commits

How to rebase a git Pull Request branch

How to update a Pull Request on GitHub

How to Collaborate on a Pull Request on GitHub

How to create a Pull Request on GitHub

Setting up the project locally

How to Fork and Clone a GitHub Repository

Identifying How to Contribute to an Open Source Project on GitHub

How to authenticate with GitHub using SSH

How to install Git SCM

Exploring a Repository

Exploring GitHub

Introduction to GitHub

Redirect the browser using JavaScript

The JSON.stringify API

JavaScript's Call Stack

Find patterns at the start and end of lines with line anchors in regular expressions

P

Use backreferences in regular expressions

P

Use regular expression word boundaries

P

Use lookaheads in regular expressions

P

Create capture groups in regular expressions

P

Use shorthand regular expression character classes

P

Use character classes in regular expressions

P

Use regular expressions to find repeated patterns

P

Find plain text patterns using regular expressions

P

Get started with regular expressions in javascript

How to use JavaScript's String.replace

P

Safely inspect nested objects with Reduce

P

Compose functions with reduce

P

Use Some as a Ternary Operator or Conditional

P

The JSON.parse API

P

Intro to Recursion - Detecting an Infinite Loop

P

Web Audio API: The Delay Node

4 common ways to get a substring from a string in JavaScript

P
js tutorial about Using GraphQL's GraphiQL Tool

Using GraphQL's GraphiQL Tool

6:07 js

We'll learn how to use GraphQL's GraphiQL tool as an IDE for writing GraphQL queries, covering how to write a query, leverage query variables, perform specific operations, and also how to use the Documentation pane to explore an existing GraphQL schema.

js tutorial about Logging Pretty-Printing Tabular Data to the Console

Logging Pretty-Printing Tabular Data to the Console

3:09 js PRO

Learn how to use console.table to render arrays and objects in a tabular format for easy scanning over the values. We'll create some mock data and then render it to the log in various ways to explore console.table's API.

js tutorial about Logging Timing Data to the Console

Logging Timing Data to the Console

1:35 js PRO

Learn to use console.time with console.timeEnd to get accurate timings of operations in javascript. This tool can help with javascript profiling and performance optimization, and knowing how to use the console to do it means you don't have to pollute your codebase with timers and placeholders.

js tutorial about Using console.count to Count Events

Using console.count to Count Events

2:16 js PRO

Learn how to user console.count in order to log out how many times a given thing has happened.

js tutorial about Proper use of console.assert in JavaScript

Proper use of console.assert in JavaScript

3:06 js PRO

Learn about console.assert, which is syntactic sugar for logging an error the console when a given condition is not met. It's useful, but may not do what you expect if you're coming from another language - watch this lesson to learn how to use it, and when not to.

js tutorial about Grouping and Nesting Console Log Output

Grouping and Nesting Console Log Output

3:11 js PRO

Organize your log output by grouping your logs into collapsable hierarchies using console.group().

js tutorial about Advanced Console Log Arguments

Advanced Console Log Arguments

3:52 js PRO

Get more mileage from your console output by going beyond mere string logging - log entire introspectable objects, log multiple items in one call, and apply C-Style string substitution to make the console work for you.

js tutorial about Log Levels and Semantic Methods

Log Levels and Semantic Methods

4:38 js PRO

Go beyond console.log by learning about log levels, filtering log output and structuring your output to be meaningful and concise. The JavaScript console object offers many methods to make your life easier - start learning them here!

js tutorial about Up and Running with Facebook Flow for Typed JavaScript

Up and Running with Facebook Flow for Typed JavaScript

2:11 js PRO

Let's learn how to set up Facebook's Flow inside of a project and write a simple typecheck task that will let us run Flow against any files in our codebase.

js tutorial about Add a browser build to an npm module

Add a browser build to an npm module

6:16 js

Currently, our library is being distributed as a CommonJS module, but we should support the browser as well. In this lesson, we're going to use webpack to create a UMD (Universal Module Definition) build of our module so users can consume it in a browser.

js tutorial about Maps and WeakMaps with ES6

Maps and WeakMaps with ES6

5:14 js

A brief introduction to Maps and WeakMaps with ES6, the usage of and difference of Maps and WeakMaps.

js tutorial about Add Elements onto an Array with Push

Add Elements onto an Array with Push

3:26 js

Array push is used to add elements to the end of an Array. In this lesson we'll see how the push method accepts multiple arguments, can be used to merge two arrays, and how it can be used to represent user input.

js tutorial about Getting Started with Redux Dev Tools

Getting Started with Redux Dev Tools

6:04 js

The Redux DevTools let us wire up our Redux app to a time-traveling debugger. This can help us debug, test, and review the state of our application in a simple history that can be "bookmarked" and scrubbed through. In this lesson, we wire up the Redux DevTools into our app, and walk through the different "monitors" and options available.

More information can be found on the official Redux DevTools GitHub page: https://github.com/gaearon/redux-devtools

js tutorial about Promises with ES6

Promises with ES6

5:51 js

Promises in JavaScript (es6/es2015). Creating and using promises with ECMAscript 2015 in your JavaScript application.

js tutorial about Refactoring tip: no empty lines inside a function

Refactoring tip: no empty lines inside a function

5:00 js PRO

To keep code elegant and readable, this lesson presents a refactoring technique consisting of two rules: (1) Don't have empty lines in a function, (2) keep the function short, with at most 6 or 8 statements. See how this can help keep each function focused on one responsibility.

js tutorial about Getting a Pull Request Merged and Wrapping up

Getting a Pull Request Merged and Wrapping up

1:13 js

Let’s look at the GitHub commits and list of contributors now that our pull request has been merged. And we’ll wrap this series up with a few tips. Feel free to practice on stack-overflow-copy-paste, and see the Pull Request demonstrated in this lesson here.

js tutorial about How to squash multiple git commits

How to squash multiple git commits

2:53 js

Often, project maintainers prefer that a single pull request be represented by a single commit. It makes the git history cleaner and easier to understand. So before your pull request is merged you’ll want to do an interactive git rebase to squash all of your commits and fix your commit message.

js tutorial about How to rebase a git Pull Request branch

How to rebase a git Pull Request branch

3:39 js

Sometimes your Pull Request can fall behind master in a repository and occasionally that will result in merge conflicts which you have to manage yourself. In this lesson we’ll learn how to use git rebase to update our pull request branch to the latest version of master and resolve merge conflicts with git.

js tutorial about How to update a Pull Request on GitHub

How to update a Pull Request on GitHub

2:57 js

Once you’ve made your code updates locally, all you need to do is commit those changes and push that commit to your Pull Request branch. In this lesson we’ll also talk about how to skip git hooks that may be included in the project when you just need help.

js tutorial about How to Collaborate on a Pull Request on GitHub

How to Collaborate on a Pull Request on GitHub

2:21 js

It’s not often that you’ll get a Pull Request on GitHub just right the first time you try. You generally will iterate with the project maintainer on your solution before your PR gets merged. In this lesson, we’ll explore some of the tools that projects use to manage contributions to open source projects on GitHub.

js tutorial about How to create a Pull Request on GitHub

How to create a Pull Request on GitHub

6:19 js

Often when making a change, you want to verify your approach with the maintainer or ask them for help. In this lesson we’ll make a change and commit that WIP change. Then we’ll create a pull request requesting help from the project maintainer.

js tutorial about Setting up the project locally

Setting up the project locally

1:18 js

Before you start making your changes, you often need to set up your environment for the changes. This is where the repositories' contributing instructions come in really handy. In this lesson we’ll get our environment set up and ready for changes.

js tutorial about How to Fork and Clone a GitHub Repository

How to Fork and Clone a GitHub Repository

2:41 js

You cannot push code to repositories that you don’t own or have sufficient permission to. So instead, you make your own copy of the repository by “forking” it. You are then free to make any changes you wish to your repository.

js tutorial about Identifying How to Contribute to an Open Source Project on GitHub

Identifying How to Contribute to an Open Source Project on GitHub

2:15 js

When you find a bug in an open source project, you know exactly the change you want to make. Other times you just want to find a way to contribute. Either way, you’ll need to know how the project maintainers want to run the project and work with them to come up with an implementation for the fix/feature. And if you don't even know what project to start contributing to, check out this blogpost for inspiration on how to identify a good project to contribute to.

js tutorial about How to authenticate with GitHub using SSH

How to authenticate with GitHub using SSH

3:34 js

Anytime you push code to GitHub, you must be authenticated so GitHub knows you are authorized to make changes. In this lesson we’ll learn how to authenticate with GitHub using SSH so we don’t have to enter our username and password each time we push code to GitHub.

js tutorial about How to install Git SCM

How to install Git SCM

2:15 js

Let’s install the Git Source Control Management software so we can interact with repositories hosted on GitHub.

js tutorial about Exploring a Repository

Exploring a Repository

4:07 js

The basic unit of GitHub is a repository. This is where your code is stored and GitHub allows you to interact with others and with the code in great ways. In this lesson we talk about Watching, Starting, and Forking a repository. We also cover GitHub issues and pull requests and various other stats about a GitHub repository.

js tutorial about Exploring GitHub

Exploring GitHub

1:47 js

GitHub adds a lot of great features on top of git repository hosting. We’ll take a look at some of these features including:

  • How to create a repository and organization on GitHub
  • How to explore and find projects on GitHub
  • About GitHub gists
  • Searching pull requests and issues on GitHub
js tutorial about Introduction to GitHub

Introduction to GitHub

0:47 js

In this lesson we’ll talk about what GitHub is and how to sign up for a GitHub account so you can contribute to an open source project on GitHub.

js tutorial about Redirect the browser using JavaScript

Redirect the browser using JavaScript

2:13 js

There are two common ways to redirect the browser in JavaScript. Both use window.location but they differ in how they interact with Session History (and hence, the browser's back button). In this lesson, you'll learn how they're different and how to use each of them.

js tutorial about The JSON.stringify API

The JSON.stringify API

8:26 js

JSON (JavaScript Object Notation) is a standard method to serialize JavaScript objects and is commonly used to transfer data from the server to the browser. The browser has a JSON API that allows you to serialize a JavaScript object or array into a JSON string. This API allows you to customize the serialization very specifically as well.

js tutorial about JavaScript's Call Stack

JavaScript's Call Stack

3:45 js

JavaScript has a concurrency model based on an "event loop". Yet, we know that JavaScript is single-threaded, which means only one task can happen at a time. To understand how JavaScript has a concurrent model yet is single threaded, we'll take a look at how the browser is working to interpret your JavaScript.

Specifically, we'll start by looking at the Stack implemented by browser engines (e.g. V8 or SpiderMonkey). The JavaScript engines use the call stack to keep track of what functions are running -- a function is added to a stack when the engine reaches a function that needs to be executed, and it cleared from the stack when the function returns.

js tutorial about Find patterns at the start and end of lines with line anchors in regular expressions

Find patterns at the start and end of lines with line anchors in regular expressions

3:19 js PRO

We can identify the start and end of a line using Line Anchors. When dealing with multiple line matches we can utilize the multiline regular expression flag.

js tutorial about Use backreferences in regular expressions

Use backreferences in regular expressions

3:31 js PRO

Regular Expression Backreferences provide us a method to match a previously captured pattern a second time.

js tutorial about Use regular expression word boundaries

Use regular expression word boundaries

2:18 js PRO

Regular Expression Word Boundaries allow to perform "whole word only" searches within our source string.

js tutorial about Use lookaheads in regular expressions

Use lookaheads in regular expressions

1:27 js PRO

Lookaheads allow us to match a pattern followed by another pattern without including the second pattern in our match.

js tutorial about Create capture groups in regular expressions

Create capture groups in regular expressions

4:35 js PRO

In this lesson we'll capture groups of characters we wish to match, use quantifiers with those groups, and use references to those groups in String.prototype.replace.

js tutorial about Use shorthand regular expression character classes

Use shorthand regular expression character classes

1:42 js PRO

In this lesson we'll learn shorthands for common character classes as well as their negated forms.

js tutorial about Use character classes in regular expressions

Use character classes in regular expressions

2:41 js PRO

Regular Expression Character Classes define a group of characters we can use in conjunction with quantifiers.

js tutorial about Use regular expressions to find repeated patterns

Use regular expressions to find repeated patterns

3:53 js PRO

Regular Expression Quantifiers allow us to identify a repeating sequence of characters of minimum and maximum lengths. In this lesson we'll use Regular Expression Quantifiers to match repeated patterns, common Quantifier patterns, and using shorthand for those common Quantifier patterns.

js tutorial about Find plain text patterns using regular expressions

Find plain text patterns using regular expressions

2:29 js PRO

The simplest use of Regular Expressions is to find a plain text pattern. In this lesson we'll look at at finding plain text patterns as well as using the metacharacter "." and how to escape a metacharacter.

js tutorial about Get started with regular expressions in javascript

Get started with regular expressions in javascript

6:00 js

In this lesson we'll learn two ways to construct a Regular Expression in Javascript, explore the methods available to us directly from the RegExp constructor, use Regular Expressions with String.prototype methods, and build a simple regex highlighter.

js tutorial about How to use JavaScript's String.replace

How to use JavaScript's String.replace

5:26 js PRO

In JavaScript, you can change the content of a string using the replace method. This method signature is overloaded with a bunch of different ways to do string replacement in JavaScript. This lesson covers the entire API (including an interesting DSL for the replacement string).

js tutorial about Safely inspect nested objects with Reduce

Safely inspect nested objects with Reduce

6:29 js PRO

A common problem when dealing with some kinds of data is that not every object has the same nested structure. lukeskywalker.parents.father.isjedi works, but anakinskywalker.parents.father.isjedi throws an exception, because anakin_skywalker.parents.father is undefined. But we can reduce a path to provide safe default values and avoid exceptions when walking the same path on non-homogenous objects - watch to learn how! :)

js tutorial about Compose functions with reduce

Compose functions with reduce

8:19 js PRO

Javascript has first-class functions which means that any function can stored, passed around, and returned just like an Object can. This allows for a lot of flexibility with how you call functions. This allows us to use array reduction to create functional pipelines by composing arrays of functions.

js tutorial about Use Some as a Ternary Operator or Conditional

Use Some as a Ternary Operator or Conditional

5:43 js PRO

some returns a boolean value after passing each item in the source array through the test function that you pass in as the first parameter. This makes it well suited to the types of queries that require a simple yes or no answer. In this lesson we look at 2 practical use-cases for some. The first shows how it can be used with a ternary operator to switch a class on an element & the second shows how some can be used in an if conditional.

js tutorial about The JSON.parse API

The JSON.parse API

3:35 js PRO

JSON (JavaScript Object Notation) is a standard method to serialize JavaScript objects and is commonly used to transfer data from the server to the browser. The browser has a JSON API that allows you to parse the JSON string into a JavaScript object. This API allows you to customize the parsing behavior very specifically as well.

js tutorial about Intro to Recursion - Detecting an Infinite Loop

Intro to Recursion - Detecting an Infinite Loop

5:39 js PRO

When using recursion, you must be mindful of the dreaded infinite loop. Using the recursive function that we’ve built up over the previous lessons, we look at how a simple duplicated configuration item could cause chaos for our program as it has no context of which items it has previously seen. We fix this problem by introducing a parents array, which can keep track of which top-level commands have already been accessed.

js tutorial about Web Audio API: The Delay Node

Web Audio API: The Delay Node

3:51 js

In this lesson, we cover the delay node, creating an echo effect.

js tutorial about 4 common ways to get a substring from a string in JavaScript

4 common ways to get a substring from a string in JavaScript

2:38 js PRO

There are four common ways to get a substring from a string in JavaScript, substring, substr, slice, and split + join. In this lesson you'll learn what the API to each of these methods is and how they compare.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?