scrimba
Frontend Career Path
Getting hired
JavaScript Interview Challenges
Challenge - Collect Unique Genre Tags
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

Challenge - Collect Unique Genre Tags
AboutCommentsNotes
Challenge - Collect Unique Genre Tags
Expand for more info
index.js
run
preview
console
import mediaData from "./data.js";

/* Find All Unique Tags

As a software dev at ScrimFlix, you're working on a feature
to let users browse TV shows by tag. The first step is to collect all
the tags from our data into a new array. Then we'll need
to filter out the duplicate tags.

Write a function that takes in the media data and returns
a flat array of unique tags.

Expected output:
["supernatural", "horror", "drama",
"fantasy", "reality", "home improvement", "comedy", "sci-fi", "adventure"]

*/

function getUniqueTags(data){

}

console.log(getUniqueTags(mediaData));

Console
undefined
,
/index.html
-0:54