When it comes to working with URLs in JavaScript, there are a few different ways to get the current URL that you are on. In this article, we will go over some of the different methods that you can use to get the current URL in JavaScript....
Double negation is a common JavaScript trick that allow you to convert different types to boolean. Here鈥檚 how double negation works in JS.
...
There are 3 main ways you can copy something to clipboard with JavaScript. The main one is the Async Clipboard API. It reads the text from DOM and places it on the clipboard.
...
Every date in JS can be represented as a number of milliseconds since Jan 1, 1970. Here鈥檚 how you can get the timestamp value from any JavaScript date.
...
In JavaScript, the best way to reliably verify that a string is a valid email is by using a regular expression. Here鈥檚 how it鈥檚 done.
...
Learn how you can implement fast deep cloning of objects in JavaScript.
...
Both let and var allow you to create variables in JavaScript. The main differences between them are scope, hoisting and closures.
...
The difference between double and triple equals equality operators in JS is the typecast. While strict equality immediately returns false if the operand types are different, loose equality operator first tries to convert both values to a common type....
There are 2 jQuery selectors that can help you determine whether an HTML element is visible or not.
First, you can use the selector :visible to check if an element is visible on the web page....
Node Package Manager, or npm is an integral part of the modern JavaScript apps. Anytime you install an npm package, the package manager will cache the files for faster access in the future. Let鈥檚 see how you can save disk space by clearing the NPM cache.
...