print value of javascript variable in console

Micheal picture Micheal · Jul 25, 2012 · Viewed 81.1k times · Source

I have a javascript variable that is storing some values:

Can i echo it in firebug or somewhere to see what values are being stored.

var p = user.permissions;

I am using extjs3.

Answer

Micheal picture Micheal · Jul 25, 2012

Never mind. I had to add this line

var p = user.permissions;

Before:

console.log(p);

I was just typing console.log(p);