range function is a generator, and in this post we
look at how
range works under the hood. This is accomplished
by creating our own range class and incorporating an iterator protocol
into it. We then create an instance of our custom class and use a custom
for statement to iterate over it.
An often overlooked aspect of good web design is ensuring that each page has a proper HTML structure. In this post, we take a look at a simple Table of Contents tool that can be used to check your page hierarchy from the point of view of a screen reader. In addition, a few “best-practice” rules are reviewed for ensuring a good page layout, in terms of both structure and semantics.
In this post we take a look at how destructuring can be used to conveniently unpack values from arrays, or properties from objects, into distinct variables.