This commit is contained in:
47
01_grundlagen/uebungen/#u46_richtige-gewinner.html
Normal file
47
01_grundlagen/uebungen/#u46_richtige-gewinner.html
Normal file
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Übung 46: Richtige Gewinner</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<div class="container py-5">
|
||||
<div class="alert alert-primary">
|
||||
<h1>Übung 46: Richtige Gewinner</h1>
|
||||
<p>
|
||||
Die Ausgabe der Gewinner aus dem letzten Beispiel (Codebeispiel 324) ist immer noch nicht ideal. Am Besten
|
||||
wäre das folgende Ergebnis-Array:
|
||||
</p>
|
||||
<pre>
|
||||
<code>
|
||||
[
|
||||
'1st place: Heribert',
|
||||
'2nd place: Friedlinde',
|
||||
'3rd place: Tusnelda',
|
||||
'Oswine',
|
||||
'Ladislaus',
|
||||
]
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
<div class="output alert alert-secondary"></div>
|
||||
</div>
|
||||
</main>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
const outputEl = document.querySelector('.output');
|
||||
|
||||
const winners = ['Heribert', 'Friedlinde', 'Tusnelda', 'Oswine', 'Ladislaus'];
|
||||
|
||||
// Beispiel
|
||||
const getWinners = (winners) => {};
|
||||
|
||||
console.log(getWinners(winners));
|
||||
outputEl.innerHTML = `<ul><li>${getWinners(winners).join('</li><li>')}</li></ul>`;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user