🚀 CYBER WEEK SALE: 50% OFF on JavaScript Fundamentals 💪

How to check if an HTML element is visible or hidden with jQuery

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

January 4, 2022 · 1 min · Coderslang Master

What is a NullReferenceException in C#

In C#, when you try to access something that’s null, you’ll get a NullReferenceException. The description will say Object reference not set to an instance of an object. It means that you’re trying to use something that hasn’t been initialized....

January 3, 2022 · 1 min · Coderslang Master

What is a NullPointerException and how to fix it

A NullPointerException is an error that occurs when you try to access a null object. This can happen when you forget to initialize an object, or when you try to access an object that doesn’t exist. To fix a NullPointerException, you need to find the line of code that is causing the error and either initialize the object, or change the code so that it doesn’t try to access the null object. ...

November 6, 2022 · 2 min · Coderslang Master

How to clear NPM cache and save space

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’s see how you can save disk space by clearing the NPM cache. ...

January 1, 2022 · 1 min · Coderslang Master

How to Print an Array in JavaScript

Learn how to print the whole array with JS and how to print individual elements of the JS array in both HTML (browser) and Node.js (server-side) environments. ...

December 31, 2021 · 1 min · Coderslang Master

Show or Hide any HTML element with a Button Click

To toggle (show/hide) an HTML element with a button click you need to do one simple trick in the onclick handler of that button. Let me show you how it’s done. ...

December 30, 2021 · 2 min · Coderslang Master

HTML Vertical Line

You can add a vertical line to your HTML page by using the <div> tag with custom CSS styling. Let’s dive into the details. ...

December 29, 2021 · 1 min · Coderslang Master

Disable any Button with JavaScript

You can disable any HTML button with JavaScript, by setting its disabled property to true. Let’s see how you can locate a specific button and prevent clicks by disabling it. ...

December 28, 2021 · 1 min · Coderslang Master

How to Create a Confirmation Modal with "yes" and "no" options in JS

A JavaScript confirm function is a convenient way to display the confirmation box with the “OK” and “Cancel” options and capture user’s response. Let’s see how it’s done. ...

December 27, 2021 · 1 min · Coderslang Master

How to add a line break in HTML

You can add a line break in HTML using the <br> tag. It works in all browsers. The <br> tag is a so-called “empty tag”, which means it doesn’t need a closing tag....

December 26, 2021 · 1 min · Coderslang Master