DEV Community

Cover image for JS Introduction
Jahid.Dev
Jahid.Dev

Posted on

JS Introduction

  1. JavaScript was created by Brendan Eich in 1995. He developed it while working at Netscape Communications Corporation. The language was initially called Mocha, then renamed to LiveScript, and finally to JavaScript. The first version of JavaScript was included in Netscape Navigator 2.0, which was released in December 1995.

  2. A computer program is a list of instructions to be executed by a computer. In a programming language, these programming instructions are called statements. A JavaScript program is a list of programming statements.

  3. JavaScript statements are composed of Values, Operators, Expressions, Keywords, and Comments.

  4. An expression is a combination of values, variables, and operators, which computes to a value The computation is called an evaluation.

  5. The JavaScript syntax defines two types of values-
    Fixed values (Literals) and Variable values (Variables)

  6. JavaScript can display data in different ways -
    innerHTML, document.write(), window.alert(), console.log(), window.print()

  7. var = Declares a variable.
    let = Declares a block variable.
    const = Declares a block constant.

  8. if = Marks a block of statements to be executed on a condition.
    switch = Marks a block of statements to be executed in different cases.
    for = Marks a block of statements to be executed in a loop.
    function = Declares a function.
    return = Exits a function.
    try = Implements error handling to a block of statements.

  9. JavaScript uses the keywords var, let and const to declare variables. Arithmetic operators ( + - * / ) to compute values.
    Assignment operator ( = ) to assign values to variables.

  10. // Single Line Commnet
    /*
    Multi Line
    Comments

    */

Top comments (2)

Collapse
 
rakibul-dev profile image
MD RAKIBUL ISLAM

It was beginner-friendly, keep writing.
Best of luck.

Collapse
 
webdemon profile image
Jahid.Dev

Thanks brother!