Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
JavaScript Projects for Kids

You're reading from   JavaScript Projects for Kids Gear up for a roller-coaster ride into the world of JavaScript and programming with this easy-to-follow, fun, and entertaining project-based guide

Arrow left icon
Product type Paperback
Published in Jan 2016
Publisher Packt
ISBN-13 9781785287176
Length 188 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Syed Omar Faruk Towaha Syed Omar Faruk Towaha
Author Profile Icon Syed Omar Faruk Towaha
Syed Omar Faruk Towaha
Arrow right icon
View More author details
Toc

Comments

Suppose you have done a lot of coding and some logical operations, and used a number of variables on JavaScript, and you want me to help you with the code if any errors occur. When you send me the code, I will not know what you have typed unless I have a clear knowledge of JavaScript or you have commented on the important lines.

A comment is basically a line of text or code that your browser ignores while running. You can compare comments to sticky notes or reminder.

Let's consider the following example:

Var name = "Sherlock Holmes"; // This is a string
Var occupation = "Detective"; // This variable stores information
Var age = 14; // This is an integer type of data.

How do you make multiline comments? You mention the comment in the following manner:

/*
  This is a multiline comment.
  The browser will ignore this.
  You can type any important information on your comment.
*/

Your multiline comment should be between /* and */, as shown in the following screenshot...

You have been reading a chapter from
JavaScript Projects for Kids
Published in: Jan 2016
Publisher: Packt
ISBN-13: 9781785287176
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime