There are 3 parts to this homework. The homework is only complete if all parts are submitted.
Homework is only incomplete if 1 or more parts are not submitted. Non-working code is not an incomplete. Please turn in any code you have.
This homework is due Tuesday September 18st at 5pm. Late submissions are not accepted.
For the main part of this week's homework, you're going to be polishing up last week's assignment with a cleaner UI and cleaner code.
There are two parts to this week's redo. They are as follows:
Match the designs to look like the following images:
You will need to use Font Awesome for the icons.
- Replace all for loops with
forEach
,map
,filter
,find
,some
,every
,findIndex
, orincludes
- Use a switch statement for the primary logic
- All rendering takes place in a render function
- No global variables other than functions and state (so command and employeeList should be on state).
Using the code in practice_problem.zip
do the following:
The following code should add a new button with a unique number every time the more button is clicked and render 'Make More Buttons'. This functionality works perfectly! But it also should render the number of the new buttons when one of them is clicked. This doesn't work :(. Research how to add event listeners to dynamically added buttons and fix the code.
When you have succeeded, pressing the 1
button, should render '1' to the page. Pressing the 2
button, should render '2' to the page, and so on.
Read the commented code carefully and make sure you understand the application before you begin.
Read the following article: What exactly is Node.js?
-
You may need to read the article several times to fully understand it.
-
You may need to Google concepts that you don't fully understand.
-
When you fully understand the article, write a synopsis as though you are explaining the concepts to a ten year old.
-
Your summary must be at least 150 words.
-
Your summary must include one analogy. Example "A conditional is like a fork in the road. You go one way if you want to go home and another if you want to go to work."