Skip to main content
Module

x/isx/numbers.ts>isOdd

TypeScript-first is function collections
Go to Latest
function isOdd
import { isOdd } from "https://deno.land/x/isx@1.0.0-beta.24/numbers.ts";

Whether the value is odd or not.

Examples

Example 1

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

Parameters

value: number
  • Any number.

Returns

boolean