Chapter 3
Higher Order Functions in JavaScript
Section 6
Converting an Array of Nodes to a Tree
This practical exercise will make you think out of the box a bit for understanding how advanced reduce functions can be implemented. We will use the reduce function to create a tree data structure from an array of nodes. - Learn the definition of binary trees and node lists - Reduce the node list to a tree - Test the solution by running the code and comparing it to the expected result