Comparing things in JavaScript == vs ===, which should I use?

Image for post
Image for post
Photo by Charles “Duck” Unitas on Unsplash

If === is not equal to == then what does it equal???


huh? — Giphy

Let’s break it down

First, let us define the two operators:

  • === is known as the Strict Equality Operator
  • == is the Abstract Equality Operator
A === B // returns true or false
Y == Z // also returns true or false
1 == "1" // returns true1 === "1" // returns false as the type is not…

Will a forced culture of working from home have a negative impact on remote working?

Image for post
Image for post
Photo by Charles Deluvio on Unsplash

Remote-working during a pandemic

I recently started a job as a software developer and part of the draw was that I had the option to work from home.

Over the past 8 months, I’ve gradually adapted to a mixed week of 2/3 days of remote work, balanced with days in our London office.

For those who have been forced to working remotely since COVID-19, I want to assure you, this is not normal.

At this moment, you are not just “working from home.” You are “at your home, during a crisis, trying to work.” — Kelli María Korducki

Working during a pandemic, no matter how unaffected you feel, is significantly harder than normal. …

Two ways to quickly remove an element from an array in JavaScript

Image for post
Image for post

So you want to remove an item from an array in JavaScript?

Well, you’re not alone!

It’s one of the most upvoted JavaScript questions on stack overflow and can feel a little unnatural considering how simple it is to array.push().

Method 1 — remove an element with Array.filter()

If you want to remove an element while leaving the original array intact (unmutated) then filter() is a good choice!

Removing a single element:

const itemToRemove = 3const originalArray = [2, 51, 3, 44]const newArray = originalArray.filter(item => item !== itemToRemove)console.log(newArray) // [2, 51, 44]
console.log(originalArray) // [2, 51, 3, 44]

We define a variable newArray and set it equal to the return value of our array filter. Inside of our filter, we pass an ECMAScript 6 arrow function. …


Kitson Broadhurst

Front end developer at Bright Analytics, London, working mainly with React @kit_son

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