Johnny Simpson

Johnny Simpson @smpnjn

About: Daily dev tips from fjolt.com - Regular tips to help you improve your development skills.

Joined:
Nov 15, 2021

Johnny Simpson
articles - 220 total

v-show vs v-if: Conditional Rendering in Vue

v-if and v-show are two ways to conditionally render content in Vue. Both are built to conditionally...

Learn More 6 0Feb 6 '23

Checking if a value is a number in Javascript with isNaN()

In Javascript, we have numerous ways to check if something is or is not a number. This is a...

Learn More 9 6Feb 5 '23

Javascript Arrays - How to Remove Duplicate Elements

Javascript arrays can contain duplicates - which is fine most of the time, but can sometimes cause...

Learn More 2 0Feb 4 '23

Javascript Arrays

Arrays in Javascript are a simple, one dimensional way to store simple sets of data. Arrays are non...

Learn More 2 0Feb 4 '23

Javascript toLowerCase() - Convert Strings to Lowercase

a String is a type of data in Javascript, and as with any other type of data, Strings have prototypes...

Learn More 2 0Feb 4 '23

How to Check if Object is Empty in JavaScript

Defining a new object in Javascript is pretty easy - but what if you want to find out if it's empty?...

Learn More 8 3Feb 4 '23

Javascript Promise.all() - Everything you need to know

The Promise.all() method in Javascript is a function which accepts many promises, and then does...

Learn More 3 1Feb 4 '23

Javascript innerHTML

In Javascript, we have lots of different ways to manipulate DOM elements. DOM elements are the HTML...

Learn More 2 0Feb 4 '23

Centering Elements in CSS with Tailwind

Tailwind is an increasingly popular and widely used framework, which makes it easier in some cases to...

Learn More 15 0Feb 4 '23

Getting Started with Redis and Node.JS

Redis is a powerful tool for caching data and having it available in memory. Redis requires RAM to...

Learn More 4 0Jan 29 '23

Javascript Array Some Method

I've already covered in another article the Javascript every method. It's useful for when checking if...

Learn More 1 0Jan 28 '23

Javascript: Check if an Array is a Subset of Another Array

There are many use cases where knowing if an array is a subset of another can be quite useful - and...

Learn More 29 5Nov 13 '22

Javascript Array Every Method

Sometimes with arrays, we want to test every element for a certain condition. While individual...

Learn More 17 0Nov 13 '22

Creating and Generating UUIDs with Javascript

Universally Unique Identifiers (UUIDs) are used all over the place in software development for...

Learn More 12 1Nov 13 '22

Javascript Array Concat Method

The concat method on arrays is used to take two arrays and concatenate them into one. It takes as...

Learn More 5 0Nov 13 '22

Javascript Immediately invoked function expressions (IIFE)

Immediately invoked function expressions, or IIFE, are functions which are run as soon as you define...

Learn More 12 0Nov 6 '22

Javascript loops: for vs forEach vs for.. in vs for.. of

There are quite a few ways in Javascript to loop through an array of items or any other iterable item...

Learn More 30 1Nov 6 '22

Removing the last element of an array in Javascript

One of the most frequent operations we perform on an array is removing the last element. There are a...

Learn More 8 1Nov 6 '22

Javascript Ordinals: Adding st, nd, rd and th suffixes to a number

In Javascript it's usually considered best practice to work with absolute numbers, as number is a...

Learn More 9 0Nov 5 '22

Git: Renaming a Branch

Git branches are an easy way to manage our code, and separate our copies of our code when we want to...

Learn More 5 0Oct 25 '22

Git Merge: Merging Changes from other Branches

Git provides a powerful tool by letting us create branches. When our branch is done, we'll often want...

Learn More 11 0Oct 25 '22

Resolving Git Merge Conflicts

Merge conflicts are often a part of life for working on complex development projects. In this guide...

Learn More 51 1Oct 23 '22

A Step by Step Guide to Git Branches

In my previous guide on getting started with git, I briefly covered how git branches work. You can...

Learn More 30 0Oct 23 '22

Javascript Shallow Copy - what is a Shallow Copy?

Shallow copy and deep copy are terms thrown around in Javascript that can be confusing if you have...

Learn More 77 14Oct 22 '22

CSS Individual Transform Properties

CSS transforms are a useful way to translate, rotate, and create 3d objects in CSS. I covered...

Learn More 19 0Oct 22 '22

Javascript Proxy: Using Javascript Proxies like a Pro

Proxies are objects in Javascript which allows you to make a proxy of an object, while also defining...

Learn More 96 8Oct 22 '22

The Complete Beginners Guide to Getting Started with Git

Git can be daunting to understand since it is completely driven from the terminal, but at its core...

Learn More 21 0Oct 22 '22

What are NodeLists, and how do they work?

Did you know that Javascript does not class a selection of multiple elements as an array? Instead, it...

Learn More 10 0Oct 20 '22

Javascript Add Event Listener to Multiple Elements

If you've ever worked in vanilla Javascript, you might be familiar with adding event listeners to...

Learn More 34 5Oct 20 '22

Javascript Array Filter Method

The filter method in Javascript creates a shallow copy of an array, filtering it based on a number of...

Learn More 20 0Oct 17 '22