Skip to main content

ISODD

Returns -true if a number is odd.

Syntax

expression.ISODD(arg1);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe value to test.

Returns

boolean

Example

Return true if a number is odd in a spreadsheet.

// How to check if the number is odd in a spreadsheet.

// Use a function to check whether a number is odd or not in a spreadsheet.

const worksheet = Api.GetActiveSheet();

let func = Api.WorksheetFunction;
let result = func.ISODD("94");
worksheet.GetRange("C3").SetValue(result);