Object.keys({}).length === 0; // true
      Object.keys({name: 'Atta'}).length === 0; // false
      

      Javascript language logo
      Check if an object is empty

      check
      object
      empty
      ...
      Javascript recipes

      Using Object.keys() Method

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.