How do I test for an empty JavaScript object?
Asked 07 September, 2021
Viewed 1.1K times
  • 65
Votes

After an AJAX request, sometimes my application may return an empty object, like:

var a = {};

How can I check whether that's the case?

30 Answer