/js_tree-from-object-DOM

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

  1. Replace <your_account> with your Github username in the link
  2. Follow this instructions
    • Run npm run test command to test your code;
    • Run npm run test:only -- -n to run fast test ignoring linter;
    • Run npm run test:only -- -l to run fast test with additional info in console ignoring linter.

Tree from object

Write a function createTree(element, data) that creates a nested list of ul/li from an object. Use keys as list items.

element - is a DOM element

data - is a nested object

Hint: use Recursion

screenshot of the tree