scrimba
The JavaScript Language [JSL] Module 5 (Arrays)
Sorting Gadgets
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

Sorting Gadgets
by
AboutCommentsNotes
Sorting Gadgets
by
Expand for more info
index.js
run
preview
console
const mixedGadgets = [
{ name: "Batarang", owner: "Batman" },
{ name: "Caltrops", owner: "CatWoman" },
{ name: "Grapple Gun", owner: "Batman" },
{ name: "Clawed Gloves", owner: "CatWoman" },
{ name: "Smoke Bomb", owner: "Batman" },
{ name: "Cat o' Nine Tails", owner: "CatWoman" },
];

// Use filter method to create two arrays, one for Batman's gadgets and one for CatWoman's
// Hint: Use filter to filter objects based on the 'owner' property

// Use map method to transform arrays into arrays of gadget names (strings)
// Hint: Use map to extract the 'name' property from each object

Console
/index.html
LIVE