Skip to content
Snippets Groups Projects
Commit 43ef6fdd authored by Rebecca Arkhed's avatar Rebecca Arkhed :herb:
Browse files

Klart

parent 1640a0ba
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ function setupPage() { ...@@ -20,7 +20,7 @@ function setupPage() {
} }
let tbody = null; let tbody = null;
let genresCountDown = []; let genresCountDown = []; // kopia av genre-listan
function fetchAndShowTrends() { function fetchAndShowTrends() {
genresCountDown = genres.slice(); // kopiera genres arrayen genresCountDown = genres.slice(); // kopiera genres arrayen
...@@ -31,13 +31,6 @@ function fetchAndShowTrends() { ...@@ -31,13 +31,6 @@ function fetchAndShowTrends() {
showElement("loader"); showElement("loader");
fetchNextGenre(); fetchNextGenre();
// genres.forEach((genre) => {
// console.log("Fetch genre rating " + genre);
// fetchGenreMeanRating(genre);
// });
// hideElement("loader");
} }
function fetchNextGenre() { function fetchNextGenre() {
...@@ -45,8 +38,8 @@ function fetchNextGenre() { ...@@ -45,8 +38,8 @@ function fetchNextGenre() {
hideElement("loader"); hideElement("loader");
return; return;
} }
let genre = genresCountDown.shift(); let genre = genresCountDown.shift(); // ta första elementet i listan, samt ta bort det
console.log("Fetch genre rating for" + genre); console.log("Fetch genre rating for " + genre);
fetchGenreMeanRating(genre); fetchGenreMeanRating(genre);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment