Files
JS/01_grundlagen/uebungen/u04_clueck-codes.html
Philippe Torrel 84fc2efe6f
2026-09-09 10:51:04 +02:00

29 lines
867 B
HTML

<!doctype html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Übung 2: Alarm!</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 4: Die Länge von Strings</h2>
<p>
Multipliziere die Länge deines Vornamens mit der Länge deines Nachnamens und lass dir das Ergebnis in der
Konsole ausgeben.
</p>
</div>
</div>
</main>
<script>
'use strict';
console.log('Florian'.length * 'Hölzel'.length); // => 42
console.log('Philippe'.length * 'Torrel'.length); // => 48
</script>
</body>
</html>