![]() The name and email properties should be added as two paragraphs inside the list item. The second argument to the function, targetList, is an unordered HTML list to which each customer should be added as a separate list item. The first argument to the function, customers, is an array of objects with the name and email properties. Implement the showCustomers function so that it renders customers as list items. Let relative = closestRelative(parent, 'Mike') Ĭonsole.log(relative & relative.tagName) // prints MIKE If no matching relative is found the function should return null.įor example, the below code should print 'MIKE' for the given family tree: let parent = document.getElementsByTagName('James').If several children in the same generation have the same name, then the first child in the tree is considered the closer relative. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |