Check for Empty Array in Javascript
Checking that an array is empty in Javascript involves more than using !array. This is because an array is an object and you cannot simply negate an object in a conditional. With that said, the code block below will never run.
const countries = []
if...
vicradon.hashnode.dev2 min read