Use Javascript Comments To Annotate Your Code • Use Javascript Comments To Annotate Y...
Javascript comments are used to annotate your code. This is important for when your future self revisits the code and needs a little memory-jog to figure out what the code is doing.
Or if other developers need to work with your code the comments help them figure out what you were trying to do.
You can create single line comments using two forward slashes: //
For example:
// This is my single line comment
You can create multi-line comment blocks using a forward slash and asterisk to open the comment block: /*. Then an asterisk followed by a forward slash to close the comment block: */
For example:
/*
This my multi-line comment block
This my multi-line comment block
This my multi-line comment block
*/
That's all there is to it. I hope this video helps you! If you have any questions, please leave them in the comments below. And before you go, subscribe and like :)
If you're into Wordpress, check out my WPLearningLab channel to learn more about WordPress so you can earn more for yourself, for your clients or for your business.
On this page of the site you can watch the video online Use Javascript Comments To Annotate Your Code with a duration of hours minute second in good quality, which was uploaded by the user Full Stack Coding Tutorials 15 May 2017, share the link with friends and acquaintances, this video has already been watched 153 times on youtube and it was liked by 5 viewers. Enjoy your viewing!