scrimba
Frontend Career Path
Getting hired
JavaScript Interview Challenges
Challenge - Candy Sale
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

AboutCommentsNotes
Challenge - Candy Sale
Expand for more info
index.js
run
preview
console
import products from "./data.js";

/*
It's the day after Halloween 🎃 and all the candy is on sale!

To buy up all the candy, use map() and filter() to put all the
candy into a `shoppingCart` array.

The new array should contain only the item and the price, like
this:

Expected output:
[
{item: "🍭", price: 2.99},
{item: "🍫", price: 1.99},
{item: "🍬", price: 0.89}
]
*/

function getSaleItems(data){

};
Console
/index.html
-0:40