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...
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...
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 =...
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...