how to get the number of items in an object javascript code example Example: javascript get number of elements in object Object.keys(obj).length