Uncaught Typeerror: Cannot Read Property 'keys' Of Undefined
I have these data in my console. var uniqVisitorDeviceType = visitorDeviceType.reduce((acc, val) => { acc[val] = acc[val] === undefined ? 1 : acc[val] += 1; return acc; },
Solution 1:
You have an Object
, not an array
. Use Object.keys(uniqVisitorDeviceType)
instead.
Post a Comment for "Uncaught Typeerror: Cannot Read Property 'keys' Of Undefined"