JS Drip #57: Finding an Object's Size in JavaScript

27 views
Skip to first unread message

Jaap Karan Singh

unread,
Mar 18, 2014, 8:36:28 AM3/18/14
to js-drip-d...@googlegroups.com
Typo in code snippet?

var bookCount = bookAuthors.keys().length;

I am guessing it should be:

var bookCount = Object.keys(bookAuthors).length;


Joshua Clanton

unread,
Mar 19, 2014, 8:46:10 AM3/19/14
to js-drip-d...@googlegroups.com
You are correct. :-)

Thanks for pointing out the error!

Josh Clanton
Reply all
Reply to author
Forward
0 new messages