From b1f9f32e98950710b0c073ad5455ef798ca78a8a Mon Sep 17 00:00:00 2001 From: Visnu Date: Wed, 1 Dec 2021 20:25:20 -0500 Subject: [PATCH 1/3] started working and got through most of them --- components/Menu.js | 55 +- package-lock.json | 4201 +++++++++++++++++++++++++------------------- 2 files changed, 2480 insertions(+), 1776 deletions(-) diff --git a/components/Menu.js b/components/Menu.js index b27794d01..f8988e85c 100644 --- a/components/Menu.js +++ b/components/Menu.js @@ -9,25 +9,50 @@ let menuItems = [ 'Log Out' ]; -/* - Step 1: Write a component called 'menuMaker' to create a menu like the markup below: +// +// Step 1: Write a component called 'menuMaker' to create a menu like the markup below: - +function menuMaker(array) { + const menuCont = document.createElement('div'); + const menuUl = document.createElement('ul'); - The 'menuMaker' takes an array of menu items as its only argument. + menuCont.appendChild(menuUl); - Step 2: Inside the function, iterate over the array creating a list item
  • element for each item in the array. - Add those items to the