Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html lang="pl">
- <head>
- <title>Lista</title>
- <meta charset="utf-8">
- <link rel="stylesheet" href="styles.css">
- </head>
- <body>
- <ul id="lista"></ul>
- <script>
- for (let i = 1; i <= 15; i++) {
- if(i%3===0 && i%5===0){
- output = 'podzielna przez 3 i 5'
- }
- else if(i%3===0){
- output = 'podzielna przez 3'
- }
- else if(i%5===0){
- output = 'podzielna przez 5'
- }
- else
- output = i;
- document.getElementById("lista");
- const el = document.createElement('li');
- el.append(output);
- lista.appendChild(el);
- }
- </script>
- <article id="footer">
- <a href="index.html" title="powrot">Powrót</a>
- </article>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement