If you have ever cooked a meal at home, then you can understand how to write stateful code using object-oriented programming methods in JavaScript.

When you start writing simple JavaScript programs, you don’t need to worry about the number of variables you are using, or how different functions and objects work together.

For example, most people start out by using a lot of global variables, or variables that are scoped at the top level of the file. They are not part of any individual class, object or function.

For example, this is a global variable called state:

let state =…

If you have ever gone down a water slide, then you can understand arrow functions.

If you have been using JavaScript for a few years, you are probably familiar with this syntax:

function addTen(num){
return num + 10;

This function syntax was popular in ES5, or ECMAScript 5.

There is one major advantage to this syntax: It includes the word function, so it is obvious that you are writing a function!

A function clearly takes in anywhere from 0 to many arguments and runs a specific set of statements every time that it is called.

But then the world of JavaScript took a leap forward with ES6 in 2015.

Now, the same…

If you understand the general way that Hollywood movies are made, then you can understand Node Package Manager (NPM).

Did you know that the initial version of Node.js was written by just one programmer, Ryan Dahl, in 2009?

Today, in 2018, millions of developers have used Node.js to create the back-end for their web applications. But, Node has relied on an active open-source community to build out many specialized packages within the Node Package Manager, or NPM.

There are two reasons why Ryan Dahl did not develop all of these specialized functions himself:

  1. Developers would not want to use a…

If you understand how a brewery works, then you can understand Amazon Web Services (AWS).

Photo by Elevate on Unsplash

When you are working on building your first web app, you ALWAYS hear about the ease of launching a new product compared to past years.

People will say things like, “Back in my day, you had to buy your own server and configure it yourself!”

Or, “We would stay up all night debugging the latest issue with our server infrastructure.”

Fortunately, those days are long gone. You can deploy your new web app for $10 a month within an hour, if you know what you are doing.

But, there is one small problem. Standard tools like Amazon Web Services (AWS)…

If you have ever read a nutrition label, then you can understand the reduce() method in JavaScript.

The reduce method in JavaScript gives you a simple way to take an array of values and combine them into one value, or sum the array based on multiple category.

Wow, that is a lot in one sentence, so let’s take a step back here.

Of course, you can always use a for loop to iterate through an array and take a specific action on each value. But, if you do not use methods like filter(), map() and reduce(), then your code will…

If you have ever visited a restaurant, this guide will help you understand how dev tools like Chrome Dev Tools and text editors like Sublime Text work.

When you are building your first website with HTML and CSS, you can easily get overwhelmed with all the new technologies that are needed to deploy even a basic site.

Hosting services?

Text editors?

File directories?

All of these technologies go way beyond the tutorials that you may have tried on sites like freeCodeCamp and Codecademy!

So, I figured a quick tutorial on using text editors and dev tools would remove one confusing…

If you get dressed for work or school in the morning, then you can understand file directories.

When you are building your first website with HTML, CSS and JavaScript, you only need a very simple file directory.

You have one folder with three total files, and perhaps an image file or two if you are using a background image or a logo.

But, as your site grows, you will need to start using multiple folders to organize your different files. And, if you write your own back-end using a language like Node.js …

Photo by Brittney Bulter on Unsplash.

If you have ever watched a TV show about court (or been to court), then you can understand booleans in JavaScript.

You might think that booleans are the most straightforward topic that you could ask for in JavaScript.

After all, since a variable can be any of the following:

  • number
  • string
  • array
  • object
  • boolean

…boolean seems to be the easiest.

let bool = true;let bool= false;

The only two options for a boolean are true or false. And they are used in if() statements to decide which statement should be executed.

if(true){}else{// if value is false…

If you are familiar with the college application process, then you can understand JavaScript’s filter functions.

Compared to the map() and reduce() methods in JavaScript, the filter()method has probably the most straightforward name.

You input an array, and you filter out the elements that fulfill a specific condition into a new array.

This seems simple, but I always seemed to find myself reverting to for() loops. So, I decided to find a better way to understand how filter() functions worked.

I realized that filter functions are kind of like a college admissions officer. They use a set of parameters to…

If you have ever bought milk at the supermarket, then you can understand server-side and browser-side caching.

If you are an avid internet user (you probably are), you have benefitted from caching over and over again. But, you might not know when or how it is working its magic behind the scenes.

From a developer’s perspective, caching makes it much easier to build high-performing web apps and web servers. Instead of needing to constantly optimize servers that are overwhelmed by thousands of requests, developers can implement caching protocols to make life much easier.

Since caching might make a difference between…

Kevin Kononenko

Founder of CodeAnalogies (www.codeanalogies.com). Self-taught web developer. Passionate about not making same mistakes twice. Only new mistakes!

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