From the course: AI-Powered Development: GitHub Copilot in Visual Studio Code

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Code competion: JavaScript

Code competion: JavaScript

GitHub Copilot's most familiar feature is probably its inline code suggestions. The autocomplete that appears as you type. You'll hear it called different things depending on who you talk to, inline suggestions, code completion, autosuggest, whatever the name, the concept is the same. The files that I'm using in this chapter are in this completions folder. I'm working in this datetime example JavaScript file. I want to write some code in this function. I've already stubbed in the function. What I'd like to do is declare a constant. So I'm going to start typing the letters C-O-N like this and you'll see several things happen. There's a drop-down list that appears and this is showing known keywords that are available or usually used in Visual Studio Code for JavaScript. So there's confirm console, there's constant, continue, and so on. And you'll notice as I move up and down this list with my arrow on my keyboard, then I'm also seeing some auto suggestions like on the constant, it's…

Contents