Dynamic Game Selector

Instructions

  1. Create a JavaScript array of video game categories (at least 3).
  2. Populate the dropdown dynamically using the array.
  3. Add a default option labeled Select a Game Category.
  4. When a category is selected:
    • Show the matching content section.
    • Hide all other content sections.
    • Note: Newly added categories will appear in the dropdown, but you do not need to create a corresponding content section for them in this assignment.
  5. Add functionality to:
    • Enter a new category name
    • Dynamically add it to the dropdown when a button is clicked
    • Validate that a category is filled in.
    • Validate that a duplicate category is not being entered

Action Games

Fast-paced games that focus on combat and reflexes.

Role-Playing Games (RPG)

Games focused on story, character development, and progression.

Strategy Games

Games that emphasize planning, tactics, and decision-making.