Tuesday, 21 January 2014

Comments and Statements in javascript programming video tutorial in english.Tutorial Number 2 by thenewboston

Tuesday, 21 January 2014 - by Tania Jamil 0

JavaScript Comments


Comments can be added to explain the JavaScript, or to make the code more readable.

Single line comments start with //

Multi line comments start with /* and end with */.

Example:

// Write to a heading:
document.getElementById("h1").innerHTML="Welcome to Tutsclub.com";
/*
The code below will write
to a heading and to a paragraph,
and will represent the start of
my homepage:
*/

 

JavaScript Statements


JavaScript statements are "commands" to the browser.

The purpose of the statements is to tell the browser what to do.

Example:

document.getElementById("demo").innerHTML="Tutsclub";

This JavaScript statement tells the browser to write "Tutsclub" inside an HTML element with id="demo":

Credits:

I fond this tutorial on youtube. This tutorial is created by Thenewboston.

Watch Here The original uploaded video from authors website.

About the Author

Write admin description here..

0 comments:

© 2013 Tech Portion. WP Theme-junkie converted by BloggerTheme9