how to check how many keys are there in an javascript object code example Example: js count keys in object Object.keys(obj).length