🔧 JavaScript Array Functions & Connections Game This project consists of two main tasks designed to demonstrate proficiency in JavaScript array manipulation and DOM manipulation.
Task 1: Array Functions In this task, a JavaScript array containing objects is provided. The goal is to perform the following operations on the array and display the results in an HTML element:
Element Identification: Determine what element Zuko bends and display the result. Age Verification: Check if all characters are adults (older than 18) and display 'Yes' or 'No'. Waterbender Listing: List the names of all waterbenders in the array. These tasks are aimed at showcasing skills in array iteration, condition checking, and DOM manipulation.
Task 2: Connections Game The Connections Game involves creating four groups of words from a set of 16, based on various connections. The game is partially implemented, and the following additional features are required:
Cell Selection: Add an event listener to the table cells. When a cell (td) is clicked, its background color should change to light green, and the cell's content should be added to the selected array. Selection Reset: Before adding a new selection, check if the selected array has 4 elements. If it does, reset the selection by emptying the array and removing the background color from all cells. Display Selection: After selecting 4 elements, display them in a new card by creating a ul element, appending li elements for each selected item, and then appending the ul to the element with the id #answers. This task is focused on enhancing user interaction through event handling, dynamic DOM updates, and condition-based logic.