This commit is contained in:
Philippe Torrel
2026-07-07 10:29:34 +02:00
parent f3ca79e09b
commit f583bf92a3
14 changed files with 201 additions and 61 deletions

View File

@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="de">
<head>
<meta charset="UTF-8" />
@@ -36,7 +36,13 @@
['Russia', 'Moscow'],
];
const getCapitalOf = () => {};
const getCapitalOf = (country) => {
return countriesWithCapital.find((elemArr) => {
return elemArr[0] === country;
})[1];
};
console.log(getCapitalOf('Switzerland')); // => 'Bern'
</script>
</body>
</html>