In this article, the job is to identify whether a function is defined or not. The JavaScript typeof operator is used to solve the problem… Read More
Tag Archives: JavaScript-Questions
Given an HTML document and the task is to change the text of the span element. There are two properties used to change the content.… Read More
Given a date and the task is to subtract days from the date. To subtract days from date in JavaScript, some methods are used which… Read More
Given a date and the task is to get the Month and Date in 2-digit format. Use JavaScript methods to get the Month and Date… Read More
Given a date, the task is to add seconds to it. To add seconds to date in javascript, we’re going to discuss a few techniques.… Read More
Below are the methods to convert different objects to strings. Method 1: Using the function String(), the String() function converts the value of an object… Read More
JavaScript replace() method is used to replace all special characters from a string with _ (underscore) which is described below: JavaScript replace() Method: This method… Read More
Given a string and the task is to replace all lowercase letters from a string with the other characters. The method which is used to… Read More
In this article, we will remove text from a string in Javascript. There are three methods to remove the text from a string which are… Read More
JavaScript methods are used to disable the right-click on the page. The used methods are listed below: HTML DOM addEventListener() Method: This method attaches an… Read More
Given a sentence and the task is to replace the spaces(” “) from the sentence with underscores(“_”). There are some JavaScript methods are used to… Read More
Given a date, the task is to add days in milliseconds to it. To add days in milliseconds to date objects in JavaScript, some methods… Read More
Method 1: Using instanceof operator. The instanceof operator checks whether the prototype property of a constructor appears anywhere in the prototype chain of an object.… Read More
Given a date and the task is to add minutes to it. To add minutes to the date object in javascript, some methods are used… Read More
Given an HTML document and the task is to get the text of an <span> element. There are two methods used to get the span… Read More