Javascript

JavaScript instanceof Operator

JavaScript instanceof Operator – What it Does, How to Use It

This article will explain what the JavaScript instanceof operator does and how it can be used. Examples provided. What does instanceof do? The instanceof operator returns TRUE or FALSE depending on whether a given value or variable is of a certain type or class – it checks whether a value is an instance of a given… Read More »JavaScript instanceof Operator – What it Does, How to Use It

JavaScript Refresh Page

How to Refresh the Page in JavaScript using location.reload(), With Examples

Here’s a short guide to refreshing a webpage with JavaScript, with examples. There are over 500 ways to trigger a page reload using JavaScript. All but one are unofficial or are the side effect of another behavior. Here’s how to do it properly. Using location.reload() Simply… Read More »How to Refresh the Page in JavaScript using location.reload(), With Examples

JavaScript Compare Dates

Compare JavaScript Dates (Day/Minute/Hour/Before/After), With Examples

Following on from our article on adding and subtracting time from dates in JavaScript – here’s how to compare two JavaScript date objects. This article will explore comparing dates/times with different granularity levels – from dates that are an exact month to dates that fall in the… Read More »Compare JavaScript Dates (Day/Minute/Hour/Before/After), With Examples