Hi, I’m using Visual Studio Code 1.61.2 to write javascript.
Let’s say i write something like this
function longest(list) {
const lengths = list.map((str, index) => ({
index,
length: str.length
}));
console.dir(lengths);
const i = lengths.reduce(
(acc, obj) => (obj.length > acc ? obj.index : acc),
-1
);
return list[i];
}
Using a Mac I can put the cursor over either console
or dir
and press Command
and view the documentation in a popup.
This does not work on the .map
method.
How do I configure VSCode so that I can see the method information for .map
?
I want it to link to an explanation as comprehensive as https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map
Thanks
Jon