Filtering out coffee beans (another bad pun) | Photo Credit: Yanapi Senaud

JavaScript array methods are super useful, and learning how to use them can really help improve the readability of your code. This is the third and final part of this series, and today I’ll be discussing the filter function and how you can use it to make your code more concise. It's probably the easiest of the three to understand, since it's fairly straightforward, but it's always helpful to have examples on hand to understand exactly how it does and doesn't work.

Psst — don’t have time to read through the entire article? …


Discarded boxes being reduced to blocks (get it?) | Photo Credit: Ignat Kushanrev

JavaScript array methods are super useful, and learning how to use them can really help improve the readability of your code. This is the second part of a series on JavaScript array functions, where I dive into examples from real, production codebases. Today’s function is reduce, which (for me at least) was the most abstract one of the three. By virtue of its abstractness, however, it's also the most powerful. In fact, it's possible to do the jobs of the other two using just reduce alone! (Even though you shouldn't. Definitely, absolutely, do not do this.)

Much like the map


JavaScript array methods are super useful, and learning how to use them can really help improve the readability of your code. However, since most developers start off with basic for loops and while loops, making the switch to more abstract constructions like map, reduce, and filter can be quite difficult. There are lots of posts describing these functions and giving examples, but very few actually compile a list of these being used in a real codebase. …


Blogs that show an estimated reading time can get upwards of 400% increased click-through rates. Since I roll my own stack for my statically built blog posts, I thought it would be a fun exercise to try and add this useful metric to my blog page.

The stack

In general, HTML templaters are designed to take custom data and merge them with predefined templates. My current blog post templating setup is a single Java program which uses almost Markdown-like syntax to insert content into a prewritten HTML file. I won’t go into the details too much, but suffice it to say that…


Pre-pandemic presentations really hit different | Photo Credit: Austin Distel

I think by now everyone with a LinkedIn account has seen at least one post announcing an internship or job offer. For people who’ve been searching for ages and sending out resumes into what seems like a bottomless void, these posts can seem like a slap in the face. But no longer — today, I’ll be talking about my experience applying for a job internship, and how you can take actionable steps to increase your chances of getting an offer too.

Every post I’ve seen so far that talks about getting an internship (and I’ve seen many) have always said…


It’s well supported, allows you to store large files, and isn’t even that bad to work with.

A database isn’t much more than a set of drawers, really | Photo Credit: Jan Antonin Kolar

Imagine a calculus exam where you had to do all the calculations in your head. It’s technically possible, but there’s absolutely no reason to do it. The same principle applies to storing things in the browser.

Today, there are a number of widely implemented technologies for client-side storage. We have cookies, the Web Storage API, and IndexedDB. While it’s entirely possible to write a fully functioning web application without worrying about any of these, you shouldn’t. So how do you use them? Well each of them has a use case that they’re best suited to.

A quick overview of browser storage

Cookies

Cookies, being sent on basically…


JavaScript factories tend to be much less imposing.

Hi everyone! In today’s Microblog post, we’ll be looking at JavaScript closures and how you can use them to make factories.

First, though — why learn about this technique? Well, even though many people dive straight into frameworks like React and Angular, it’s always good to understand the fundamental vanilla JavaScript underlying those frameworks. As a result, you’ll be able to do more both with and without the frameworks supporting you. Now, onto closures:

What are closures?

Good question. At their core, closures are simply an enclosed scope inside a function. They allow an inner function to access the variables in an outer…

Shailesh Vasandani

Forward thinking full stack developer, passionate about using tech to make the world better.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store