Template project for JavaScript Introduction Assignment Task 1: Word Counting Utility Functio Function Name: countWords Description: This utility function takes an input sentence and counts the occurrences of each word within the sentence. It returns an object with words as keys and their corresponding counts as values.
Task 2: Filtering and Reversing an Array Function Name: filterAndReverse Description: This utility function creates a shallow copy of an input array, filters the elements based on a callback function, and then reverses the resulting array.
Task 3: Node Class and Selector Search Class Name: Node Description: The Node class represents a tree node with a tag, children, classes, and an id. It also provides a search method to search for nodes in the tree based on a CSS-style selector string.