This commit is contained in:
Philippe Torrel
2026-09-09 10:51:04 +02:00
parent 627096ba41
commit 84fc2efe6f
9 changed files with 212 additions and 5 deletions

View File

@@ -68,11 +68,11 @@
'use strict';
// window.alert('Hello World'); // window muss als äußerstes Objekt nicht explizit angegeben werden. (Angabe ist optional)
alert('Hello World');
// alert('Hello World');
// let result = window.prompt('Die Anwort auf alles?');
// let result = prompt('Die Anwort auf alles?');
// console.log(result); // => string | null
let result = prompt('Die Anwort auf alles?');
console.log(result); // => string | null
let answer = confirm('Lust auf eine Pause?');
console.log(answer); // => boolean (true | false)

View File

@@ -16,6 +16,7 @@
</a>
- Das globale String-Objekt ist ein Konstruktor für Strings, auch Zeichenketten genannt.
</p>
<div class="output alert alert-secondary my-3"></div>
</div>
</main>
@@ -25,7 +26,7 @@
let outputEl = document.querySelector('.output');
let firstName = 'John';
let lastName = "Wick"; // prettier-ignore
let lastName = 'Wick'; // prettier-ignore
let fullName = firstName + ' ' + lastName;

View File

@@ -36,7 +36,11 @@
console.log(typeof function () {}); // => 'function'
console.log(typeof 0b1001); //=> 'number'
console.log(typeof 0xfff); //=> 'number'
console.log(typeof 0o17); //=> 'number'
console.log(typeof 123e5); //=> 'number'
console.log(Number.MAX_SAFE_INTEGER); // 9007199254740991
console.log(typeof 123n); // => 'bigint' (2020)
// =======================
@@ -45,6 +49,7 @@
console.log(typeof undefined); // => 'undefined'
console.log(typeof var2); // => 'undefined'
console.log(typeof var2 === 'undefined'); // => true
console.log(typeof [1, 2, 3]); //=> 'object' vom Typ Array
console.log(typeof { firstName: 'John', age: 30 }); //=> 'object' vom Typ Object

View File

@@ -10,7 +10,42 @@
<main>
<div class="container py-5">
<h1>Prioritäten-Tabelle</h1>
<!-- TODO: Tabelle in HTML aus Lektion (3.7.2) erstellen -->
<table class="table table-striped">
<thead class="table-dark">
<tr>
<th>Priorität / Präzedenz</th>
<th>Name</th>
<th>Operator</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Gruppierungsoperator</td>
<td>Klammern ()</td>
</tr>
<tr>
<td>2</td>
<td>typeof-Operator</td>
<td>typeof</td>
</tr>
<tr>
<td>3</td>
<td>Multiplikation, Division, Modulo</td>
<td>* / %</td>
</tr>
<tr>
<td>4</td>
<td>Addition, Subtraktion</td>
<td>+ -</td>
</tr>
<tr>
<td>5</td>
<td>Zuweisungsoperator</td>
<td>=</td>
</tr>
</tbody>
</table>
</div>
</main>
<script>