chuanxshi / javascript-patterns

JavaScript Design Patterns
http://shichuan.github.io/javascript-patterns
9.39k stars 1.7k forks source link

For-in loop with object properties' existence check #156

Closed jojishiro closed 6 years ago

jojishiro commented 7 years ago

I've added a conditional to check whether the object is empty or not before printing any output.

chuanxshi commented 6 years ago

@georgezafiris merged, thanks!