Implement dropLast/takeLast

This commit is contained in:
2026-05-08 22:04:32 +02:00
parent 88baaebcf5
commit 8feefc24a7
28 changed files with 142 additions and 48 deletions

View File

@@ -1,8 +1,8 @@
export function minOrNull(value: number[]): number | null {
if (value.length === 0) return null;
let min = value[0];
for (let index = 1; index < value.length; index++) {
const it = value[index];
for (let i = 1; i < value.length; i++) {
const it = value[i];
if (it < min) min = it;
}
return min;