How-to articles, tricks, and solutions about JAVASCRIPT

How to Randomize (shuffle) a JavaScript Array

In JavaScript, there no any built-in method of shuffling a JavaScript array. Read this tutorial and learn what is the popular method of randomizing arrays.

How to Redirect a Web Page with JavaScript

To redirect a URL page with Javascript you need to set the window.location object. Learn how to do it.

How to Redirect a Web Page with PHP

In PHP, you can use several functions to make a redirect from one web page to another. Learn how to do it accurately with W3docs.

How to Redirect Mobile Devices With JavaScript and CSS

Learn How to Redirect Mobile Devices With JavaScript and CSS. 1.JavaScript Method, 2. CSS @media Method. Fast solution for web developers.

How to Reload a Page using JavaScript

Read the tutorial and learn information about the method of reloading a page using JavaScript. Also, learn how to make the page be loaded automatically.

How to Remove All CSS Classes Using jQuery/JavaScript

In this tutorial, you can read and learn several easy and simple jQuery methods and pure JavaScript properties that are used to remove all CSS classes.

How to Remove All the Child Elements of a DOM Node in JavaScript

Read this JavaScript tutorial and learn several simple and fast methods that are used for removing all the child elements of the DOM node with examples.

How to Remove an Element from an Array in JavaScript

Read this tutorial and learn what several useful Array methods exist that will help you remove the specified element from an Array in JavaScript easily.

How to Remove Empty Elements from an Array in Javascript

Read this tutorial and learn the method of removing empty elements from an Array. Also, read about removing falsy elements that include an empty string.

How to Remove Objects from a JavaScript Associative Array

JavaScript objects can be taught of associative arrays mapping keys to values. Read and find the method used to remove objects from an associative array.

How to Remove Spaces From String

Read this JavaScript tutorial and learn several methods that are used to remove spaces from a string. Also, know which is the fastest method to choose.

How to Remove Style Added with the .css() function Using jQuery

Read this tutorial and learn several ways of removing style added with the .css() function with the help of jQuery. Choose the best method for your case.

How to Remove Text from String

Read this JavaScript tutorial and learn useful information about several easy and fast built-in methods that are used for removing the text from a string.

How to Replace a Character at a Particular Index in JavaScript

In this tutorial, you will read and learn detailed information about methods that are used to replace a character at a particular index in JavaScript.

How to Replace All Occurrences of a String in JavaScript

On this page, you can find the fast-solutions on how to replace all the occurrences of a string in JavaScript. Read it and find the simplest solution.

How to Reset File Input with jQuery

In this tutorial, you will read and learn useful information about the fastest method of resetting a file input by using some HTML and jQuery methods.

How to Retrieve an HTML Element's Actual Width and Height

Read this tutorial and learn about the two methods that are used to retrieve an HTML element’s actual width and height. Find the best method for your case.

How to Scroll to the Top of the Page Using JavaScript

Read this tutorial and find useful information about the simplest native JavaScript method and its parameters to make the page jump on the top instantly.

How to Select All Text in HTML Text Input When Clicked Using JavaScript

Read the tutorial and learn the two methods of selecting the entire text in HTML text input when clicked using JavaScript code snippets. Also, see examples.

How to Select and Manipulate CSS pseudo-elements using jQuery

Read this tutorial and learn the simplest and fastest way of selecting and manipulating the CSS pseudo elements using some jQuery and CSS methods.

How to Sort an Array of Integers

Read this JavaScript tutorial and learn useful information about the logic of the sort() method which will help you sort an array of integers correctly.

How to Sort Array Alphabetically in JavaScript

Read this JavaScript tutorial and learn the two methods of sorting the elements of an array in alphabetical order based on the values of the elements.

How to Sort JavaScript Object by Key

In this JavaScript tutorial, you will read and learn information about a functional method of sorting an object by key supported by all major browsers.

How to Split a String Breaking at a Particular Character in JavaScript

Read this tutorial and find two easy and fast methods of splitting the string breaking at a particular character in JavaScript. Also, find and try examples.

How to Split Array into Chunks

Read the tutorial and find several easy and fast approaches to splitting a JavaScript array into smaller chunks. Choose one of the methods and try examples.