Author: codertutor_3o6d0o

JS Switch Case Statement

JavaScript Switch Case Statement JavaScript Switch Case Statement Switch Case statement is used when we have to chose between several individual cases after the evaluation of an expression. Syntax: switch (expression) { case v_1: statement_1; break; case v_2: statement_2; break; case...

JS IF-Else Statement

JavaScript IF-Else Statement JavaScript If Statement If statement is used to make a decision according to a given condition. The if statement evaluates the expression, if the value of expression is true then the instruction is executed. Syntax: if (expression){ Execute...

JS Operators

The Arithmatic Operators: The Arithmetic Operators are used with numeric operands and returns a numerical value. There are following arithmatic operators supported by JavaScript language: Let assume variable a=5 and variable b=10. Operator Description Example + Addition a + b =...

JS Variables and Data Types

JavaScript Variables and Data Types JavaScript Data Types In JavaScript there are the following types of data: String data type. Are strings between apostrophes or quotation marks. Numbers data type. Are data type integer or decimal. Boolean data type. There are...

JS Syntax document.write

Hello World – First script example in JavaScript <html> <body> <script language="javascript" type="text/javascript"> <!-- document.write("Hello World!") //--> </script> </body> </html> Result: Hello World!...