Skip to content
Carlo Fontanos
Carlo Fontanos

Carlo Fontanos

Software Engineer

I build web applications and share what I learn along the way.

© 2026

JavaScript

55 tutorials

Step-by-step programming tutorials on PHP, JavaScript, Laravel, WordPress and more.

JavaScript Intermediate

Responsive JavaScript Without Resize Listeners

Checking window.innerWidth on every resize event is wasteful and drifts out of sync with your CSS. matchMedia gives JavaScript the same breakpoints CSS uses, with change events.

2 min 4,799
JavaScript Beginner

Serialize an Entire Form in One Line with FormData

new FormData(form) reads every field in one call, posts natively with fetch, and Object.fromEntries turns it into JSON. You may never write form.elements loops again.

2 min 3,258
JavaScript Intermediate

Let Users Paste Screenshots Straight into Your App

Ctrl+V with an image on the clipboard fires a paste event carrying a real File object. Ten lines of code turn any form into a screenshot-friendly uploader.

2 min 4,952
JavaScript Intermediate

Infinite Scroll Without a Single Scroll Listener

Scroll listeners fire hundreds of times per second and need throttling, math and luck. IntersectionObserver watches a sentinel element and calls you exactly when it matters.

2 min 1,720
JavaScript Beginner

Stop Parsing Query Strings by Hand

Splitting location.search on & and = is a bug farm: encoding, arrays and empty values all break it. URLSearchParams and the URL API handle every edge case and read better.

2 min 1,791
JavaScript Beginner

console.log Is the Least Interesting Thing About the Console

console.table, console.groupCollapsed, console.time and a few DevTools-only helpers like $0 and copy() will change how you debug. Most of them are one keystroke away and almost nobody uses them.

2 min 2,600