JavaScript while loop
The while loop loops through a block of code as long as a specified condition is true. The condition is evaluated before executing the statement. In this tutorial, you will learn how … Read more
Everything You Want Is Always Here
The while loop loops through a block of code as long as a specified condition is true. The condition is evaluated before executing the statement. In this tutorial, you will learn how … Read more
The JavaScript for loop iterates the elements for the fixed number of times. JavaScript for loop should be used if number of iteration is known. A for loop repeats until a specified condition evaluates … Read more
JavaScript – innerText Property is used to write the dynamic text on the html document. It sets or returns the text content of the specified node, and all its descendants. … Read more
The innerHTML property sets or returns the HTML content (inner HTML) of an element. It can be used to write the dynamic html on the html document. Syntax Return the … Read more
The document.getElementsByTagName() method returns all the element of specified tag name. Syntax tagname – Required. The tagname of the elements you want to get. The parameter value “*” returns all elements in … Read more
The document.getElementsByName() method returns all the element of the specified name. It is useful when you want to get all elements with the specified name. Syntax “name“: It is the name attribute value … Read more
The getElementsByClassName() method is used for selecting or getting the elements through their class name value. It is used when you want to get all the elements with the specified … Read more
The document.getElementById() method returns the element of specified id. The getElementById() is a DOM (Document Object Model) method. This method returns null if no elements with the specified ID exists. The ID should be unique within a … Read more
The JavaScript Math.random() method returns the random number between 0 (inclusive) and 1 (exclusive). In this article you will learn about “How to generate random number in JavaScript?”. Syntax Parameters Math.random() … Read more
A switch statement is a control-flow statement that tests the value of an expression against multiple cases. In this tutorial, you will learn about the JavaScript switch statement with the help of examples. A switch statement … Read more