while loop in JavaScript: The while loop iterates through a block of code until specified condition gets false. Here is
Category: JavaScript Interview Questions
JavaScript Interview Questions
do while loop in javascript with examples
do while Loop in JavaScript: do while in JavaScript, this will execute code block once and then check for condition,
Run JavaScript on page load without adding code inside body tag
Run JavaScript on page load without adding code inside body tag, is as bellow: if (window.addEventListener) { // Chrome, Mozilla,
JavaScript Conditional Operator
JavaScript Conditional operator is as same as if condition,here if condition inside the parenthesis first value is been assigned to variable
JavaScript If…Else Statements
If Statement: Syntax : if (condition) { // code to be executed if condition
JavaScript Switch Statement
JavaScript switch statement is same as if..else if..else statement, but switch statement only focus which condition is true and only
JavaScript Break statement
In general,We are using JavaScript break statement with switch() statement. The JavaScript break statement breaks the execution of loop whenever find the statement
JavaScript Continue Statement
The JavaScript Continue statement will continue the next iteration, and that will not execute next line of code. JavaScript Continue
Create New HTML Element
Create New HTML element node using JavaScript: To create new element HTML , you must create the element first, and then
search Method in JavaScript
Search method in javascript The JavaScript search() method searches a string for a specified value, or regular expression, and returns
Difference between == and === in JavaScript
Difference between == and === in JavaScript === ‘strict comparison’ means is the same type and equal ==
JavaScript slice method
The JavaScript slice method extract parts of a string and returns the extracted parts in a new string. Use the