WLJS LogoWLJS Notebook

Negative

Negative[x] gives True if x is a negative number.

Examples

Test for negative numbers:

Negative[-5]
(* True *)
Negative[3]
(* False *)

Filter negative numbers:

Select[{-2, -1, 0, 1, 2}, Negative]
(* {-2, -1} *)

Please visit the official Wolfram Language Reference for more details.

On this page