Then write a function PrintDepts(depts) {…} that takes each organization departments as input and generate a nested unorder list () that displays the department names and their hierarchy.

computer science

Description

1.    Homework Requirements

Your homework project includes an HTML file, a JavaScript file and a css file.

Please define the following data in your JavaScript file:

Then write a function PrintDepts(depts) {…} that takes each organization departments as input and generate a nested unorder list (<ul>) that displays the department names and their hierarchy. You should use a recursive function because you don’t know the nesting levels of each department.  Given the above input, you should create an HTML page like the following. You should center all content and use the same styles, for example, the top level department names have no bullet symbol and are inside a green box.

  


Related Questions in computer science category