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 + +