Is there any reason why `Object.keys( x ).length` (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys) isn't recommended for getting size of objects (in section "Collections")? Having a loop for this seems odd to me.
Topic on Manual talk:Coding conventions/JavaScript
The only reason seems https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys#Browser_compatibility. As this old browsers needs no support or recommendation anymore, you can freely add this example.
The example was added in https://www.mediawiki.org/w/index.php?title=Manual:Coding_conventions/JavaScript&diff=2589439.