From 8b54dbe5e9e89a33373a2d3dc784c5a5ca6b705e Mon Sep 17 00:00:00 2001 From: gpurich Date: Thu, 30 Oct 2025 10:51:13 -0500 Subject: [PATCH] Push 10 file changes to add-10-bugs branch --- pages/index.tsx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 pages/index.tsx diff --git a/pages/index.tsx b/pages/index.tsx new file mode 100644 index 0000000..d2c43cd --- /dev/null +++ b/pages/index.tsx @@ -0,0 +1,25 @@ +import React from 'react' +import Head from 'next/head' +import Nav from '../components/Nav' +import { sum } from '../utils/calc' + +export default function Home() { + const items = ['one', 'two', 'three'] + + // BUG: off-by-one — using length instead of length - 1 when accessing + const lastItem = items[items.length] // undefined, should be items[items.length - 1] + + return ( + <> + + Home + +