Check if the building extension TypeScript and JavaScript Language Features is enabled.
To check this, go to Extensions and search for @builtin TypeScript and JavaScript Language Features
.
This should look something like this:
[![vscode][1]][1]
Edit:
Also, check if you choosed the right language?
- ->
CTRL (or CMD) + P
- ->
> Change Language Mode
- ->
JavaScript
Another thing I noticed: You have no var
, let
or const
before the variable, see https://mcmap.net/q/1920476/-visual-studio-code-intellisense-not-working-for-node-js
Edit 2:
IntelliSense does not know what types the parameters have for functions. But you can use the @param annotation in the comment:
/**
*
* @param {Array} arr
*/
function a(arr) {
arr.
}
For variables you can also use @type:
/** @type {Array} */
let a;