JavaScript evaluates expressions from left to right

JavaScript evaluates expressions from left to right. Different sequences of one and the same operands can produce different results:
var x = 16 + 4 + „Volvo“;   // x becomes „20Volvo“
and
var x = „Volvo“ + 16 + 4;    // x becomes „Volvo164“

In JavaScript, a variable without a value, has the value undefined. Its type /typeof()/ is also undefined.
var car; // Value is undefined, type is undefined

Any variable can be emptied, by setting the value to undefined. The type will also be undefined.
car = undefined; // Value is undefined, type is undefined

Вашият коментар

Вашият имейл адрес няма да бъде публикуван. Задължителните полета са отбелязани с *