This commit is contained in:
Philippe Torrel
2026-09-18 09:47:31 +02:00
parent 67d5a1dc16
commit 968ebe05bd
10 changed files with 170 additions and 72 deletions
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="de">
<head>
<meta charset="UTF-8" />
@@ -24,11 +24,11 @@
let inputs = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
//double
results = inputs.map();
results = inputs.map((n) => n * 2);
console.log(results); // => [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
//squares
results = inputs.map();
results = inputs.map((n) => n * n);
console.log(results); // => [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
//