馃殌 CYBER WEEK SALE: 50% OFF on JavaScript Fundamentals 馃挭

Detect an undefined object property in JavaScript

In JavaScript there are 2 distinct scenarios when the object property can be undefined. Let鈥檚 look into them and find out how to check for undefined fields in JS objects. ...

January 14, 2022 路 2 min 路 Coderslang Master

How to check if a variable is an array in JavaScript

If you try to apply the typeof operator to a JavaScript array, you won鈥檛 be able to tell if it鈥檚 an array. To check if a variable is an array in JS, you need to take a different approach. ...

January 13, 2022 路 1 min 路 Coderslang Master

How to get current URL in JavaScript

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....

January 12, 2022 路 2 min 路 Coderslang Master

What is a double negation !! in JavaScript and how it works

Double negation is a common JavaScript trick that allow you to convert different types to boolean. Here鈥檚 how double negation works in JS. ...

January 11, 2022 路 1 min 路 Coderslang Master

How to copy to clipboard in JavaScript

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. ...

January 10, 2022 路 1 min 路 Coderslang Master

How to get a timestamp in JavaScript

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. ...

January 9, 2022 路 1 min 路 Coderslang Master

Validate an email address with a JavaScript regular expression

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. ...

January 8, 2022 路 2 min 路 Coderslang Master

How to deep clone JavaScript objects efficiently

Learn how you can implement fast deep cloning of objects in JavaScript. ...

January 7, 2022 路 1 min 路 Coderslang Master

The difference between "let" and "var" in JavaScript

Both let and var allow you to create variables in JavaScript. The main differences between them are scope, hoisting and closures. ...

January 6, 2022 路 3 min 路 Coderslang Master

The Difference Between JavaScript Equality Operators == and ===

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....

January 5, 2022 路 1 min 路 Coderslang Master