How to access elements from Array in JavaScript? Syntax: array[index]; // where index starts from 0 and that no
Category: Interview Q&A
Interview Q&A
arrays JavaScript
There are three ways to declare arrays JavaScript: 1) First way of declaration of arrays JavaScript: var friendsName=new Array(); friendsName[0]=”John”;
How to get the value of textbox in JavaScript in asp.net
get the value of textbox in JavaScript in asp.net <!DOCTYPE html> <html> <head> <script> // access the value of the
Comments JavaScript
Comments JavaScript: Single line comments start with // 0==false // true //This is variable Var iValue=5; Multi line comments start
JavaScript Data Types
JavaScript dynamic data types are explained as follows: var x; // Now x is undefined var x = 5; //
Get the value of a textbox using javascript
Get the value of a textbox using javascript sample code: <!DOCTYPE html> <html> <head> <script> // access the value of
How to add JavaScript inside a web page?
There are mainly two ways from which we can add javascript inside web page as follows: A) Inside <head> tag.
replace method in javascript
Replace method in javascript The JavaScript replace() method searches a string for a specified value, or a regular expression, and
JavaScript lastIndexOf() Method
The JavaScript lastIndexOf() method returns the position of the last occurrence of a specified value in a string. Syntax: string.lastIndexOf(searchvalue,start)
JavaScript indexOf() Method
JavaScript indexof method The indexOf() method returns the position of the first occurrence of a specified value in a string.
JavaScript concat() Method
The JavaScript concat method is used to join two or more strings. Syntax: string.concat(string1, string2, …, stri ng N) Example
JavaScript String Methods
JavaScript String Methods Description charAt() Returns the character at the specified index charCodeAt() Returns the Unicode of the character at