001_Javascript-Introduction

  • Initially named "LiveScript".
  • Has nothing in relation to JAVA.
  • Executed using a special program called the Javascript Engine.
  • Eg: v8 in chrome, spider monkey in Firefox.
  • JS Engines parses the script and compiles the script to the machine language.

Statements

Statements are syntax constructs and commands that perform actions.

Semicolons

  • A semicolon may be omitted in most cases when a line break exists.
  • Javascript interprets the line break as an "implicit" semicolon.
  • But there are situations where Javascript fails to assume a semicolon where it is really needed. This could create hard to catch issues in the code. It's always better to have strict syntax.

Comments

  • One line comments start with two forward slash characters.
  • Eg: // this is a single-line comment.
  • Multiline comments start with a forward slash and an asterisk /* and end with an asterisk and a forward slash */.
  • Eg: /* This is a multiline comment */