Reputation: 63567
In Firefox's FireBug console, why does this happen?
>>> a = 1
1
>>> var a = 50
undefined
>>> a
50
I'm just trying to learn me some js!
Upvotes: 1
Views: 889
Reputation: 887295
var ...
is a statement.
Statements do not have values, so the console prints undefined
as the result of the statement.
Upvotes: 4