Using GitHub Copilot with JavaScript

Beginner
DevOps Engineer
Administrator
Developer
Solution Architect
Student
GitHub

To work with JavaScript, take advantage of GitHub Copilot, an AI pair programmer that boosts productivity with autocomplete-style suggestions.

Learning objectives

By the end of this module, you'll be able to:

  • Open the portfolio in a GitHub codespace and verify that Copilot is enabled in its Visual Studio Code editor.
  • Craft prompts that can generate useful suggestions from GitHub Copilot.
  • Use GitHub Copilot to update a JavaScript portfolio and check the changes in the preview.

Prerequisites

Before you start, make sure you have:

  • A basic understanding of JavaScript variables and conditionals.
  • The ability to use Git and GitHub for version control.
  • A GitHub account that can receive Copilot inline completions and use Copilot Chat in VS Code. If you use an organization-assigned seat, your organization must allow Chat in the IDE. Eligible individuals without Copilot access can activate Copilot Free. A Copilot Pro trial isn't required.
  • Permission to create a codespace on the MicrosoftDocs portfolio repository. To launch the portfolio, use Open in GitHub Codespaces in the setup unit. If you have read-only access, you need permission to fork it. An Enterprise Managed User account can't create a codespace on a repository outside its organization, even with a Copilot seat.