Misc. Codes in JS

Example : How to Use/Call External JavaScript file in an HTML Page. Example : How to move the cursor in the next HTML element/control/box by pressing Enter key/button [Enter Key Event]. Example : How to redirect/forward web page using Java Script [Redirect Page]. Example : A JS program/code segment to Refresh or Auto Refresh Read more…

Loading

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 and understandable. Parameters : The arguments received by the function Read more…

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 are a part of the Document Object Model (DOM) Level Read more…

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, booleans, objects, and other arrays at a contiguous location with Read more…

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 statement This statement executes a block of code if a Read more…

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 perform some specific operation. Types of JS Operators JavaScript has Read more…

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, byte, case, catch, char, class, const, continue, debugger, default, delete, Read more…

Loading