این محتوا تنها در این زبانها موجود است: English, Español, Français, Italiano, 日本語, 한국어, Русский, Türkçe, Українська, 简体中文. لطفاً به ما
Show descendants in a tree
اهمیت: 5
There’s a tree organized as nested ul/li
.
Write the code that adds to each <li>
the number of its descendants. Skip leaves (nodes without children).
The result:
To append text to each <li>
we can alter the text node data
.