Value returned by the assignment
That’s the way the language was designed. It is consistent with most languages. Having a variable declaration return anything other than undefined is meaningless, because you can’t ever use the var keyword in an expression context. Having assignment be an expression not a statement is useful when you want to set many variable to the …