Tag: data

Recent Post

How to read and display a PDF using JavaScript

The native FileReader API can be used to read a PDF and create a URL to its contents.

Using JSON in JavaScript

With JSON, you can store a JavaScript native object in pure string format.

Using HTML data attributes in JavaScript and CSS

Data attributes allow you to store string data directly on HTML elements.

Preview a user image before it is uploaded

How to preview an image and check its dimensions and size before uploading.

Create a client-side download with JavaScript

You can prompt a download to begin in a user's browser without contacting a server.

Generate QR codes using JavaScript

In JavaScript, QR codes can be generated using the free QRCode.js library.

Comparing dates in JavaScript

Dates that are stored in Date objects can be compared or sorted via their Unix timestamp.

Save data to the browser with localStorage and sessionStorage

localStorage and sessionStorage objects allow you to store data from to user's browser.

map() vs forEach()

The map() and forEach() methods both iterate through arrays, but are not interchangeable.

Using the File System module (‘fs’) in Node.js

Running JavaScript in Node.js, you have access to the file system.