The Value Miner

Easy+20 XP

Mission Briefing

The gold has been scattered across multiple secure accounts. The Bank Manager needs you to extract only the monetary values from the ledger, completely ignoring the account names.

The Concept: Object Values

The Object.values(obj) method takes an object and returns an array containing only the values of each property, completely discarding the keys. Example: Object.values({ a: 10, b: 20 }); // Returns [10, 20]

The Objective

Your function receives a store object.

  1. Use Object.values() on the object.
  2. Return the resulting array of values.

01EXAMPLE 1

Inputstore = { x: 10, y: 20 }
Output[10, 20]

Constraints

  • Use the Object.values() method.
CoreObjects
JavaScript
Loading...
3 Hidden

Input Arguments

store{"x":10,"y":20}

Expected Output

[10,20]

Click RUN to test your solution