Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding comments for a method in Visual Studio Code

How can I add documentation comments for JavaScript methods in Visual Studio Code? Thanks for any advise!

like image 840
Frank Code Avatar asked Dec 05 '25 17:12

Frank Code


1 Answers

I am not sure about any particular VSCode version from which onwards it started but I use it in VSCode directly without any extension like this:

Just type /** above the function and press Enter:

enter image description here

it will automatically populate the Comment structure with JSDoc Tags based on your function:

enter image description here

like image 106
kwick Avatar answered Dec 08 '25 07:12

kwick



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!