Micheal
Micheal

Reputation: 2322

Print value of JavaScript variable in console

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;

Upvotes: 11

Views: 125458

Answers (1)

Micheal
Micheal

Reputation: 2322

Never mind. I had to add this line

var p = user.permissions;

Before:

console.log(p);

I was just typing console.log(p);

Upvotes: 21

Related Questions