javascript – Uncaught ReferenceError: keys is not defined

console.log(keys(a))

keys() is not function provided by the browser for use in your code. You probably want Object.keys()

a = {};
console.log(Object.keys(a));

Sometimes the console has extra functions exposed to it for ease of use debugging that aren’t available in your actual code. keys() sounds like one, and copy('some text') is another.

I’m failing to find a link which lists them, sadly. But I’m quite sure there are more than those 2 functions.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)