JavaScript

What is JavaScript  ?
JavaScript is the set of rules. Those rules that define a correctly structured JavaScript program.

Why do we need JavaScript ?
JavaScript is mainly used for client-side scripting within Web browsers.

How do we write code in JavaScript ?
JavaScript is case sensitive. While scriptinf we should start the name of a constructor with a capitalised letter, and the name of a function or variable with a lower-case letter.
Spaces, tabs and newlines used outside of string constants are called whitespace.
Comment syntax matches to C++ and some other languages.
// This is as one-line comment
/* this is a long, multi-line comment
 For which the syntax is different */
/* You should not  /* nest the comments */ Syntax error */

Variables in JavaScript
There is no "type" attached to Variables in JavaScript. Any value can be stored in any variable.
having said that , Variables are declared with a var statement, multiple variables can be declared at once.
 An identifier must start with a letter, underscore (_), or dollar sign ($); subsequent characters can also be digits (0-9). Because JavaScript is case sensitive, letters include the characters "A" through "Z" (uppercase) and the characters "a" through "z" (lowercase).

Friends, we will study some more about Javascript in the upcoming post. So keep watching this space for some more interesting articles:)

< Previous                                                                                                      Next >