scrimba
Frontend Career Path
Essential JavaScript concepts
JS Mini Projects
The .reduce() Method with Objects Challenge
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

The .reduce() Method with Objects Challenge
AboutCommentsNotes
The .reduce() Method with Objects Challenge
Expand for more info
itemsBoughtArr.js
run
preview
console
export const itemsBoughtArr = [
{
name: 'Electric Toothbrush Holder',
priceUSD: 40,
desc: 'A robotic arm that holds and moves your electric toothbrush for you, ensuring optimal brushing technique.'
},

{
name: 'Invisible Milk',
priceUSD: 10,
desc: 'A carton of milk that turns completely transparent when poured into a glass, providing a magical and mysterious drinking experience.'
},
{
name: 'Self-Chilling Soup Can',
priceUSD: 15,
desc: 'A can of soup that instantly chills itself when opened, so you can enjoy a refreshing cold soup on a hot summer day.'
},
{
name: 'Glow-in-the-Dark Eggs',
priceUSD: 8,
desc: 'A carton of eggs that glow in the dark, making breakfast preparation an exciting and illuminated experience.'
}
]
Console
!
SyntaxError: Unexpected token 'return'
,
!
SyntaxError: Unexpected token 'return'
,
!
SyntaxError: Unexpected token 'return'
,
/index.html
-3:29