12345678910111213141516 |
- <header>
- <h1>Reduce HTML</h1>
- </header>
- <body>
- <script>
- const currencies = ["", "USD", "EUR", "GBP", "UAH"];
- let str = "<select>";
- options = currencies.reduce((optionsStr, currency) => optionsStr += `<option>${currency}</option>`);
- str += options;
- str += "</select>";
- document.write(str);
- </script>
- </body>
|