18 lines
447 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
The types of the arguments to built-in functions are specified in the JavaScript language specifications. Calls to these functions should conform to the documented types, otherwise the result will most likely not be what was expected (e.g.: the call would always return ``++false++``).
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
const isTooSmall = Math.abs(x < 0.0042);
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
----
const isTooSmall = Math.abs(x) < 0.0042;
----