how to check if an array object is empty in javascript code example Example: es6 check if the object is empty Object.entries(objectToCheck).length === 0