By Hunter Becton on May 12, 2022
const isObjectEmpty = obj => {
return Object.keys(obj).length === 0
}
This function takes a JavaScript object as its only argument and returns true
or false
by checking if the array length of the object's keys is equal to zero.