This week's assignment focuses on advanced array methods (.map, .filter) and DOM manipulation. You'll work on two sets of challenges: array challenges and DOM challenges. Follow the instructions below to complete the tasks.
-
Fork this repository.
-
Clone your forked version to your computer.
-
Create a new branch:
git checkout -b <your-firstname-lastname>
-
All your work should be done in the provided JavaScript files.
- Do not change or touch the
index.htmlandnav_actions.jsfiles - All modifications should be done in
array_challenges.js,dom_challenges.jsfiles only.
- Open the
array_challenges.jsfile. - Follow the tasks to:
- Use
.mapto create and format a new array of movie titles and ratings. - Use
.filterto find highly-rated movies (rating >= 8.0).
- Use
- Log the results of each task in the console.
- Open the
dom_challenges.jsfile. - Follow the tasks to:
- Build the
displayArticlesfunction to dynamically display articles from thenewsDataobject based on their category. - Add event listeners to navigation links to load articles for the selected category.
- Build the
- Use the GIF below as a reference to see how the final website should look.
Below is a preview of how your DOM challenge should look after completion:
-
Save your progress regularly:
git add . git commit -m "Completed Week 6 assignment tasks" git push -u origin <your-branch-name>
-
Once done, submit your repository link through the student portal.
Good luck, and enjoy coding! 🚀
