Category: JavaScript

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

JavaScript

JavaScript is a high-level programming language that is widely used for both client-side and server-side web development. It was initially created to add interactivity and dynamic features to web pages, but over time, it has evolved into a versatile and powerful...