Tag: utility function

Recent Post

Export a JavaScript array as a CSV file on the client-side

Make an array available for download in CSV format.

Automated title capitalization with JavaScript

How to create a title capitalization function in JavaScript.

The right way to generate a random number in JavaScript

In JavaScript, you can generate a weakly random number quickly or a strongly random number slowly.

Find the index of an element in a JavaScript array by value

Get the index value of any element in an array by value and instance of its appearance.

HTML Table of Contents Generator

A JavaScript solution for generating a table of contents for HTML content.

Currency formatting in JavaScript

How to convert a numeric values to a currency value using the native Internationalization API.

Create a unique ID in JavaScript

Create a unique ID to identify a user or session with an embedded creation timestamp.

Merging several strings into one in JavaScript

Learn how to merge multiple strings into one in various formats, including a comma-separated list.

Detect an ad blocker with pure JavaScript

How to detect if a user is blocking ads using JavaScript.

How to shuffle an array in JavaScript

How to create a function that shuffles the order of array elements.