This commit is contained in:
Philippe Torrel
2026-09-16 10:38:23 +02:00
parent 99007ffc89
commit dc1e06ac67
16 changed files with 159 additions and 27 deletions
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="de">
<head>
<meta charset="UTF-8" />
@@ -25,6 +25,11 @@
const outputElement = document.querySelector('.output');
const name = 'Heribert Gold '.trim();
const firstName = name.substring(0, name.indexOf(' '));
const lastName = name.substring(name.lastIndexOf(' ') + 1);
console.log(firstName); // => 'Heribert'
console.log(lastName); // => 'Gold'
</script>
</body>
</html>