Find the Longest Word in a String Using JavaScript

In this trick, we will see how to find the longest word in a string or sentence using the javascript function code. We will check each word one by one…

Read more »

JavaScript Hard Refresh of Current Page

Hello friends, today I was working on a project and in the project I need to refresh the current page without loading the cache. So I found the solution and…

Read more »

Filter() Function with JavaScript Array

In this trick, you will see how you can use a filter() function with a javascript array and get a value from the array based on the filters. Filtering an…

Read more »

JavaScript Convert to Boolean in Using !! Operator

You can convert the value to boolean in javascript using the !! (double exclamation mark) operator. So let’s see how you can convert the value to boolean in javascript? Convert…

Read more »

How to Detect IE Browser (Internet Explorer or Edge) in JavaScript?

You can detect the ie browser using a javascript. Just create the javascript function and it in the footer or header of the webpage that you want to detect. And…

Read more »

Get Query String Parameters From URL in JavaScript

In this trick, we will know how you can get the query string parameters of the URL in JavaScript. We will URLSearchParams API to get the query string from URL….

Read more »

Get Unique Values From a JavaScript Array

To get the unique values from a javascript array, we will use a new Set native object. It is very easy and takes less time according to filter method. We…

Read more »

Copy to Clipboard with JavaScript – (also for hidden element)

In this trick, I’ll show you how you can copy to a clipboard with javascript. function copyToClipboard() { var copyText = document.getElementById(“myInputId”); copyText.select(); copyText.setSelectionRange(0, 99999); /* For mobile devices */…

Read more »

Dynamic Property Name in JavaScript

Yes, you can assign the dynamic property name in javascript and access it. You have to declare a variable for your property key and assign that variable in the javascript…

Read more »