This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
@@ -46,8 +46,12 @@
|
||||
const rivers = ['Bode', 'Brahmaputra', 'Beuvron', 'Black River', 'Belaja'];
|
||||
|
||||
// Sortieren nach Länge
|
||||
const sortByLength = (category) => category.sort((a, b) => b.length - a.length);
|
||||
//console.log(category);
|
||||
|
||||
// TODO: do it
|
||||
outputElA.textContent = sortByLength(cities).join(', ');
|
||||
outputElB.textContent = sortByLength(countries).join(', ');
|
||||
outputElC.textContent = sortByLength(rivers).join(', ');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user