1234567891011121314151617 |
- <header>
- <h1>For Select Option</h1>
- </header>
- <body>
- <script>
- const currencies = ["USD", "EUR", "GBP", "UAH"];
- let str = "<select>";
- for (let currency of currencies) {
- // YOUR MAGIC HERE
- str += `<option>${currency}</option>`;
- }
- str += "</select>";
- document.write(str);
- </script>
- </body>
|