This commit is contained in:
Philippe Torrel
2026-06-17 11:00:40 +02:00
parent f39de9f3b4
commit 1903c9fcf7
4 changed files with 67 additions and 7 deletions

View File

@@ -16,6 +16,9 @@
- [MDN - Mozilla Developer Network](https://developer.mozilla.org/) - [MDN - Mozilla Developer Network](https://developer.mozilla.org/)
- [JavaScript Historie](https://de.wikipedia.org/wiki/JavaScript) - [JavaScript Historie](https://de.wikipedia.org/wiki/JavaScript)
- [Can I Use](https://caniuse.com/) - [Can I Use](https://caniuse.com/)
- [ASCII Table](https://asciitable.xyz/)
- [HTML Entities Liste (W3c)](https://dev.w3.org/html5/html-author/charref)
- [HTML Entities & Tastaturkürzel](https://www.key-shortcut.com/html-entities/alle-entitaeten)
## Tools/ Software ## Tools/ Software

View File

@@ -30,7 +30,8 @@
let lengthName = firstName.length * lastName.length; let lengthName = firstName.length * lastName.length;
outputEl.textContent = lengthName; outputEl.textContent = lengthName;
console.log(lengthName); console.log(lengthName); // => 56
console.log('Philippe'.length * 'Torrel'.length); // => 48
</script> </script>
</body> </body>
</html> </html>

View File

@@ -58,12 +58,12 @@
let rech5 = 12 % 3; let rech5 = 12 % 3;
let rech6 = (12 * (44 / 11)) / 3 + 67; let rech6 = (12 * (44 / 11)) / 3 + 67;
document.getElementById('rech1').innerHTML = rech1; document.getElementById('rech1').textContent = rech1;
document.getElementById('rech2').innerHTML = rech2; document.getElementById('rech2').textContent = rech2;
document.getElementById('rech3').innerHTML = rech3; document.getElementById('rech3').textContent = rech3;
document.getElementById('rech4').innerHTML = rech4; document.getElementById('rech4').textContent = rech4;
document.getElementById('rech5').innerHTML = rech5; document.getElementById('rech5').textContent = rech5;
document.getElementById('rech6').innerHTML = rech6; document.getElementById('rech6').textContent = rech6;
</script> </script>
</body> </body>
</html> </html>

View File

@@ -0,0 +1,56 @@
<!doctype html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Numbers</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" />
<style>
h1 {
color: #ff9900; /* rgb(255, 153, 0) */
}
</style>
</head>
<body>
<main>
<div class="container py-5">
<h1>Numbers</h1>
<video src="https://i.imgur.com/FKwTYak.mp4" controls></video>
</div>
</main>
<script>
'use strict';
// Binär (0b = Binary)
let binaryExample = 0b1101; //=> 13
// Oktal (0o = Octal)
let octalExample = 0o17; //=> 15, 7 * (8^0) + 1 * (8^1) = 15
let octalExample2 = 0o223; // = 147, da (3 * 1) + (2 * 8) + (2 * 64)
// Hexadezimal (0x = Hex)
let hexExample = 0xff; //=> 255, da 15 * (16^0) + 15 * (16^1)
// 15 + 240
// 0 - 9 A - F
// Exponential (z.B. 123e5 = 12300000)
let exponentialExample = 123e5; // 12300000
console.log(exponentialExample);
console.log('Binär:', binaryExample, typeof binaryExample); // 13 , 'number'
console.log('Oktal:', octalExample, typeof octalExample); // 15 , 'number'
console.log('Hexadezimal:', hexExample, typeof hexExample); // 255 , 'number'
console.log('Exponential:', exponentialExample, typeof exponentialExample); // 123000 , 'number'
// BigInt (2020) vs. Number
let bigNumber = 1234567890123456n;
let normalNumber = Number.MAX_SAFE_INTEGER; // => 9007199254740991 - Maximale sichere Zahl (Number): 2^53
console.log('Max Number: ', normalNumber);
console.log(typeof bigNumber); // 'bigint'
// Gleitkommazahlen-Präzision
console.log('0.1 + 0.2 =', 0.1 + 0.2); // 0.30000000000000004
</script>
</body>
</html>