Answer & Solution
Answer: Option Option A
Solution:
document.write() can be used to create a simple HTML list dynamically by concatenating strings with <li>
tags within JavaScript code. For example, dynamically generating list items and appending them to an unordered list (<ul>
) using document.write() allows developers to create lists dynamically based on conditions or data retrieved from external sources. This approach provides flexibility in generating HTML content and is useful for creating dynamic lists or menus on web pages.