added uebungen 1 - 10

This commit is contained in:
Philippe Torrel
2026-06-30 15:02:55 +02:00
parent 41efb8a5ab
commit f642829cb1
11 changed files with 386 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Übung 2: Ist es noch weit? Sind wir schon da?</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">
<h2>Übung 2: Ist es noch weit? Sind wir schon da?</h2>
<p>Die Formel zur Berechnung von Entfernungen lautet:</p>
<code>
<pre>Math.sqrt((yDestination - yOrigin) ** 2 + (xDestination - xOrigin) ** 2);</pre>
</code>
<p>Schreibe eine Funktion distance, die du z. B. folgendermaßen aufrufen kannst:</p>
<code>
<pre>distance({ x: 1, y: 1 }, { x: 5, y: 1 }); // => 4</pre>
</code>
</div>
</div>
</main>
<script>
'use strict';
</script>
</body>
</html>