From a40e841eacf9a5967a39d51a24fa4540292efacc Mon Sep 17 00:00:00 2001 From: Olga Date: Thu, 16 Apr 2026 17:57:11 -0400 Subject: [PATCH] add:check for an empty arr --- modules/22-arrays/50-tuples/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/22-arrays/50-tuples/index.ts b/modules/22-arrays/50-tuples/index.ts index 26d3efc7..94b03c20 100644 --- a/modules/22-arrays/50-tuples/index.ts +++ b/modules/22-arrays/50-tuples/index.ts @@ -2,6 +2,10 @@ export type Point = [number, number, number]; function isTheSamePoint(p1: Point, p2: Point): boolean { + if (p1.length !== p2.length) { + return false; + } + return p1.every((el, i) => el === p2[i]); } // END