diff --git a/modules/22-arrays/50-tuples/index.ts b/modules/22-arrays/50-tuples/index.ts index 26d3efc..94b03c2 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