scrimba
Frontend Career Path
Getting hired
JavaScript Interview Challenges
Solution - Night at the Scrimbies
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Solution - Night at the Scrimbies
AboutCommentsNotes
Solution - Night at the Scrimbies
Expand for more info
index.js
run
preview
console
import podcasts from "./data.js";

/* Night at the Scrimbies

It's time for the Scrimbies, a prestigious award show for podcast hosts.
We need to assemble a list of podcast hosts so we can start handing out awards.

Write a function that takes in the podcast data and
returns a flat array of podcast hosts. There are quite a few ways to approach
this, but try solving the problem using reduce().

Once you have a flat array of hosts, write a second function to randomly assign each host a prize
from the awards array.

Example output: ["🏆 Alex Booker", "⭐ Bob Smith", "💎 Camilla Lambert" ...]

*/
const awards = ["🏆", "⭐", "💎", "🥇", "👑"];

function getHosts(data){

}

function assignAwards(data){

}


console.log(getHosts(podcasts));
console.log(assignAwards(podcasts));
Console
undefined
,
undefined
,
/index.html
-4:37