isEven.ts
zzmq.dev@gmail.com/shirt / isEven.ts
@ 12ed0fd3
Download
Ladder Summary
This file defines and exports an `isEven` function that takes a number argument and returns a boolean indicating whether the number is evenly divisible by two using the modulo operator.
+/**
+ * Determines if a number is even.
+ *
+ * @param n - The number to check.
+ * @returns true if n is even, false otherwise.
+ */
+export function isEven(n: number): boolean {
+ return n % 2 === 0;
+}