JSFiddle - React, Tailwind, and code Playground

JavaScript

function isEmpty(obj) {
  for (var prop in obj) {
    return false;
  }
  return true;
}


alert(isEmpty({}));              // true
Object.prototype.Foo = "bar";
alert({}.Foo);                   // "bar" oh no...
alert(isEmpty({}));              // true  ...**huh?!**