Use Javascript Comments To Annotate Your Code

Veröffentlicht am: 15 Mai 2017
auf dem Kanal: Full Stack Coding Tutorials
153
5

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.


Auf dieser Seite können Sie das Online-Video Use Javascript Comments To Annotate Your Code mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Full Stack Coding Tutorials 15 Mai 2017 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 153 Mal angesehen und es wurde von 5 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!