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.
Sur cette page du site, vous pouvez voir la vidéo en ligne Use Javascript Comments To Annotate Your Code durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Full Stack Coding Tutorials 15 mai 2017, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 153 fois et il a aimé 5 téléspectateurs. Bon visionnage!