Callbacks vs. Promises in JavaScript

If you’re new to JavaScript and have a hard time trying to understand how promises work, hopefully this article will assist you in understanding them more clearly. With that said, this article is aimed at those who are a little unsure about promises. This post won’t be going over executing promises using async/await (although they’re the same … Read more

how to manage HTML DOM with vanilla JavaScript only?

GitHub 01 — Add or remove class from an elementbasic 02 — Allow to enter particular characters onlyintermediate 03 — Append to an elementbasic 04 — Attach or detach an event handlerbasic 05 — Calculate the size of scrollbarintermediate 06 — Change the website faviconintermediate 07 — Check an element against a selectorbasic 08 — Check if an element has given classbasic 09 — Check if an element is a descendant of anotherbasic … Read more

New to JAMstack? Everything You Need to Know to Get Started

When we first wrote this post, the JAMstack ecosystem was still in its infancy. That was +/- 5 years ago. Back then, the Netlify founders came to us with a proposition. They had just come up with the term “JAMstack” to work around the negative connotation of “static web” and were asking if we would help to promote it. … Read more

The Complete Guide to JavaScript Classes

JavaScript uses prototypal inheritance: every object inherits properties and methods from its prototype object. The traditional class as the blueprint to create objects, used in languages like Java or Swift, does not exist in JavaScript. The prototypal inheritance deals only with objects. The prototypal inheritance can emulate the classic class inheritance. ES2015 introduces the class syntax: a syntactic … Read more

Understanding This, Bind, Call, and Apply in JavaScript

The author selected the Open Internet/Free Speech Fund to receive a donation as part of the Write for DOnations program. The this keyword is a very important concept in JavaScript, and also a particularly confusing one to both new developers and those who have experience in other programming languages. In JavaScript, this is a reference to an object. The object that this refers to can … Read more