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" />
@@ -35,7 +35,13 @@
['Russia', 'Moscow'],
];
const getCountryForCapital = () => {};
const getCountryFor = (capital) => {
return countriesWithCapital.find((elemArr) => {
return elemArr[1] === capital;
})[0];
};
console.log(getCountryFor('Paris')); // => 'France'
</script>
</body>
</html>