Skip to content

Instantly share code, notes, and snippets.

@Restoration
Created August 18, 2016 08:17
Show Gist options
  • Select an option

  • Save Restoration/f70d3467185edef572c1df0efb818e19 to your computer and use it in GitHub Desktop.

Select an option

Save Restoration/f70d3467185edef572c1df0efb818e19 to your computer and use it in GitHub Desktop.
javascriptのオブジェクトの空判定
var foo = {
fuga: 1,
hoge: 2,
};
console.log(Object.keys(foo).length === 2); // true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment