JS Functions

Definition Function is a named block of statements which can be executed/used as per need again and again in the program simply by writing its name and can return some value. Features It is useful in making a program modular …

Loading

JS Events

Introduction JavaScript’s interaction with HTML is handled through various events that usually occur when the user or the browser manipulates a web page. Definition An event is an activity associated with certain manipulation occurring with a web page. Features Events …

Loading

JS String Examples

Example : A JS program to display string output. Example : A JS program to display the string length. Example : A JS program to accept string from user and display them. Example : A JS program to display a …

Loading

JS Array

Introduction In JavaScript, an array is a multivariant & linear container to store different types of data. Definition In JavaScript, an array is a data structure that can store a collection of values of any data type, including numbers, strings, …

Loading

JS Control Statements

JS control statements are categorized into – (A) Decision Statements (B) Looping Statements (C) Jumping Statements (A) Decision/Conditional Statements: JavaScript supports the following decision statements:- (I) If statement (II) If-else statement (III) Else-if statement (IV) Switch case statement (I) If …

Loading

JS Operators

Introduction of JS Expression: An expression is a combination of operators and operands that can be evaluated. It may also include function calls which return values. For example –  x=23.5; z=x+y; x=”welcome”; Operators: Operators are symbols which is used to …

Loading

JS DataTypes

JS Keywords/Reserve Words : These words cannot be used as JavaScript variables, functions, methods, loop labels, or any object names by the programmers in their programs. A list of all the reserved words in JavaScript are – abstract, boolean, break, …

Loading

JS Introduction

History of JS JavaScript was designed by Brendan Eich, an American computer programmer in Netscape Communications Corporation. They created JavaScript in September 1995 and took only 10 days to develop the scripting language, then known as Mocha. The name JavaScript came from Netscape’s …

Loading