◐ Shell
clean mode source ↗

Show descendants in a tree

الرجوع الي الدرس

هذة المادة العلميه متاحه فقط باللغات الأتيه: Dansk, English, Español, Français, Italiano, 日本語, 한국어, Русский, Türkçe, Українська, Oʻzbek, 简体中文. من فضلك, ساعدنا قم بالترجمه إلى عربي.

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:

افتح sandbox للمهمه.