17 lines
506 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
The result of an expression with an arithmetic operator ``/, *, %, {plus}{plus}, --, -, {plus}=, -=, *=, /=, %=, {plus}`` or unary operator ``+++, -++`` when at least one operand is ``++Object++`` or ``++Undefined++`` will be always a ``++NaN++`` (Not a Number).
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
x = [1, 2];
var y = x / 4; //Noncompliant
----
2021-04-28 16:49:39 +02:00
== Exceptions
* ``++Date++`` operands: they are implicitly converted to numbers.
* The binary ``+`` operator with ``++Object++`` operand (concatenation).