Files
30-seconds-of-code/javascript/snippets/not.md
2023-05-01 22:35:56 +03:00

346 B

title, type, tags, unlisted, cover, dateModified
title type tags unlisted cover dateModified
Logical not snippet
math
logic
true succulent-7 2021-01-04T13:04:15+02:00

Returns the logical inverse of the given value.

  • Use the logical not (!) operator to return the inverse of the given value.
const not = a => !a;
not(true); // false
not(false); // true