Skip to content

Tag Archives: JavaScript-Misc

Given a JavaScript Object and the task is to serialize it into a URL query parameters using JavaScript. Approach 1: Declare an object and store… Read More
Given a date in JavaScript DateTime format and the task is to convert this time into MySQL DateTime format using JavaScript. Approach: Use date.toISOString() function… Read More
JavaScript uses the 24-hour format as default for DateTime. However, daytime in JavaScript can be displayed in 12 hour AM/PM format using several approaches. We… Read More
Since JavaScript doesn’t provide any inbuilt functions to sort a table we will be required to use native methods to sort a given table. We… Read More
Given an HTML document which is running on a device. The task is to find the width of the working screen device using JavaScript. Example… Read More
Ever tried to submit a form, by using a JavaScript? But when you tried to submit the form by using JavaScript, you might be getting… Read More
In JavaScript “0” is equal to false because “0” is of type string but when it tested for equality the automatic type conversion of JavaScript… Read More
The reason behind this behavior is that JavaScript treats non-empty string as true. First, “0” is converted into its boolean value, by automatic type conversion… Read More
Given an HTML document and the task is to hide the cursor from the given element using CSS and JavaScript. Approach: First, select the element… Read More
The task is to generate a random alpha-numeric string of specified length using javascript, we’re going to discuss few techniques. Approach 1: Creates a function… Read More
Given an image and the task is to get the width and height of the image using JavaScript. The width and height property is used… Read More
Given a document, the task is to implement functionality when the element loses focus. We have 2 options, one is the onblur event and another… Read More
We can convert a string into a float in JavaScript by using some methods which are described below: By using Type Conversion of JavaScript By… Read More
Given a number of milliseconds, The task is to convert them to date using javascript. we’re going to discuss few techniques. Approach : First declare… Read More
The task is to implement prepend() and append() method using regular JavaScript. We’re going to discuss a few methods. First few methods to know insertBefore()… Read More

Start Your Coding Journey Now!