How-to articles, tricks, and solutions about JAVASCRIPT

How to Check and Uncheck Checkbox with JavaScript and jQuery

In this tutorial, you will read and learn about several JavaScript and jQuery methods for checking and unchecking a checkbox. Choose the best one for you.

How to Check for a Hash Value in a URL Using JavaScript

Read this tutorial and learn the fastest and simplest way of checking for a hash value in the URL using the window.location.hash method in JavaScript.

How to Check for Empty/Undefined/Null String in JavaScript

In this tutorial, we are going to show you the ways of checking whether the JavaScript string is empty, undefined, or null. Just follow the guidelines.

How to Check for the Existence of Nested JavaScript Object Key

In this tutorial, you will find several methods that are used to test the existence of the nested JavaScript object keys. Also, find how to avoid TypeError.

How to Check if a Key Exists in JavaScript Object

This snippet is explaining how to check whether a key exists in a JavaScript object. Examine the solutions given above and choose the most appropriate.

How to Check If a String Contains Another Substring in JavaScript

Read this tutorial and learn several methods used to check if a string contains another substring in JavaScript or not. Read information and see examples.

How to Check if a Value is an Object in JavaScript

Checking the data type of the value can be misleading. Read this tutorial and learn which operator is used to check if a value is an object in JavaScript.

How to Check if a Variable is of Function Type

Read this JavaScript tutorial and learn several fast and useful methods that are invoked for checking whether the variable is of function type or not.

How to Check If an Element Contains a Class in JavaScript

Read this tutorial and learn valuable information about the multiple methods that are used for checking if the element contains a class in JavaScript.

How to Check if an Element is Present in an Array in JavaScript?

Very often we need to check whether the element is in an array in JavaScript or not. In this snippet, we are going to learn some methods to do that.

How to Check if an Enter Key is Pressed with jQuery

Read this tutorial and learn the right method of detecting whether the user pressed the Enter key. The given method provides a cross browser compatibility.

How to Check if an Object has a Specific Property in JavaScript

Read this tutorial and learn the methods of checking whether the specified object has the specified property in JavaScript. Find the fastest one for you.

How to Check if Element is Visible after Scrolling

Read the tutorial and find out one of the methods of checking whether the element is visible after scrolling with jQuery. Also, find about utility function.

How to Check if Function Exists in JavaScript

In this tutorial, you will read and learn information about the two methods of checking whether a function exists in JavaScript or it has not been defined.

How to Check if JavaScript Object is Empty

Read this tutorial and find methods of checking whether a JavaScript object is empty or not. Choose the best one for you and get the code immediately.

How to Check if the Variable is Undefined

This tutorial provides the method of checking whether the type of the variable is undefined. Read about the differences between undefined and “undefined”.

How to Check if User Has Scrolled to the Bottom of the Page

Read this tutorial and learn information about jQuery method that is run for checking whether the user has scrolled to the bottom of the page or near to it.

How to Check Whether a String Matches a RegEx in JavaScript

Read and learn two methods used to check whether a string matches RegEx in JavaScript. Also, see which method is the fastest and differences between them.

How to Check Whether an Object is a Date

Read this JavaScript tutorial and learn several ways that are used for checking whether the parameter passed to the method is of type Date object or not.

How to Clear Local Storage JavaScript

Read this JavaScript tutorial and learn useful information about localStorage and methods that clear the local storage of records for a specific domain.

How to Clear the Canvas for Redrawing

The <canvas> element helps drawing graphics on the fly via JavaScript. Read the tutorial and find the dos and don’ts of clearing the canvas for redrawing.

How to Clone a Date Object in JavaScript

Read the tutorial and learn two useful methods that are used to clone the Date object in JavaScript. Get the current date and the cloned one right away.

How to Clone a JavaScript Object

Cloning an object in JavaScript is one of the most common and complicated practices at the same. In this chapter, we will explain how to do it correctly.

How to Compare Two JavaScrpt Arrays

You can either loop through the arrays or convert them to string and then compare. This tutorial provides several fast methods of comparing two arrays.

How to Convert a Comma-Separated String into Array

Read this tutorial and learn information about the JavaScript built-in split() method which is called for converting a comma-separated string in an array.