02Geek HTML5 and JavaScript, TypeScript, React, Flash, ActionScript online School
Previous VideoPrevious Video

Creating Javascript Comments

<p>We&#39;ll get you familiar with some syntax first. In JavaScript you can comment a single line by putting two forward slashes in the start of that line like this:</p> <p>// one line comment</p> <p>Or if you have a lot more to say (multiple lines in a comment,) you can achieve that with ease by putting &ldquo;/*&rdquo; at the start and &ldquo;*/&rdquo; at the end like this:</p> <p><i>/* This function requires two parameters: a string and a boolean.</i></p> <p><i>It then returns a boolean that indicates if the user has a fat butt or not.</i></p> <p><i>Call it like this for example: gotFatButt(userName, isFat); */</i></p> <h3>How can Comments help us?</h3> <p>Comments can be used to achieve discipline in coding. First you can comment out any code which you don&rsquo;t want to run. If you delete your code there&#39;s always a chance you&rsquo;ll regret it later when suddenly you figure out it&#39;s just what you need. Instead of deleting, just comment out blocks of code you think you might need again. (It&#39;s almost guaranteed that if you delete a block, you WILL need it later!) </p> <p>Comments are a great way to describe your code and leave behind extra information for you and others that work with your code. A good program needs a good strategy and many times a few comments can help and improve overall understanding of your code. Comments are used as documentation many times in code as a way to share with others and yourself insight about your code. Many times we comment out debugging functions or other lines of code that we still want available but don&#39;t want them to run.</p> <p>These tips may make your life easier in the future.</p>

Intro

It's never been easier to start learning programming in JavaScript. We live in an HTML5 world: what would be better than learning how to code with JavaScript and HTML5?

03:59

The Script Tag

You must know about script tags in order to code in JavaScript, so let’s jump into it and learn with style!

04:26

OOP and DOM

Two basics which are very important in programming and provide discipline which helps you learn and stay organized

02:45

What are Variables?

Variables are the building blocks of any language, so it's best to be very familiar with them and their usage.

01:37

Strings

Strings are an important part of programming; they can be manipulated, passed as parameters and a lot more.

10:39

Creating Javascript Comments

Comments are a great asset of programming. They will help make the code more understandable and manageable

00:52

Numbers

Math is everywhere; numbers are everywhere. JavaScript lets us use them and apply math on them, so let’s have fun and learn about Numbers in JavaScript.

09:29

Boolean

Booleans help us make important decisions in programming by proving yes or no information.

09:10