Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Print value of JavaScript variable in console

Tags:

javascript

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;
like image 453
Micheal Avatar asked Jul 25 '12 19:07

Micheal


1 Answers

Never mind. I had to add this line

var p = user.permissions;

Before:

console.log(p);

I was just typing console.log(p);

like image 93
Micheal Avatar answered Oct 20 '22 17:10

Micheal