Skip to main content
Module

x/isx/number/mod.ts>isEven

TypeScript-first is function collections
Go to Latest
function isEven
import { isEven } from "https://deno.land/x/isx@1.0.0-beta.20/number/mod.ts";

Whether the value is even or not.

Parameters

value: number
  • Any number.
import { isEven } from "https://deno.land/x/isx@$VERSION/number/mod.ts"
import { assertEquals } from "https://deno.land/std@$VERSION/testing/asserts.ts"
assertEquals(isEven(0), true)
assertEquals(isEven(1), false)

Returns

boolean