Category: FAQs

Recent Post

Get CSS Styles Applied to an Element in JavaScript

How to query the CSS values of a HTML element with JavaScript.

How to Play Audio in JavaScript

Load, play, pause audio and create a playlist.

Move array item to the beginning of its array in JavaScript

Learn how without mutating the original array and in a reusable function.

Get the first and last date and day the current month in JavaScript

A native JavaScript solution using the native Date object.

How to create a function that accepts an unknown number of arguments in JavaScript

Avoid specifying manually the number of arguments that a function will accept.

Extract files from a zip file in JavaScript using JSZip

Code examples include getting file data from a user-selected zip file and a fetched zip file.

Check if an object is empty in JavaScript

How to check if a JavaScript object is empty despite the absence of a length property.

Get the current index in a JavaScript for…of loop

How to extract the current index using entries() and array destructuring syntax.

Load CSS with JavaScript and wait for it to load

You can use JavaScript to only load stylesheets that are necessary to page load.

Zip and compress files in JavaScript

Multiple files can be stored and compressed in a zip file using JSZip.