13 challenges match these filters
countUnique(records) should count distinct records by their contents, so two records with the same fields count once.
Type error
middle_item(items) should return the middle element, so middle_item([1, 2, 3]) returns 2.
Type error
count_above(values, threshold) counts how many values exceed the threshold. The values arrive as strings from a form, so count_above(["1", "5", "10"], 3) should return 2.
Type error
total_for_ids(counts, ids) totals the counts for the given ids. counts comes from a JSON payload, e.g. {"1": 10, "2": 20}, and ids are integers.
Type error
highest(values) should return the largest number from a list of numeric strings, so highest(["9", "10", "2"]) returns "10".
Type error
describeType(value) should name the type of a value, returning "null" for null and "object" for real objects.
Type error
sumPrices(prices) should total a list of price strings, so sumPrices(["1.5", "2.5"]) returns 4.
Type error
countZeros(values) should count how many entries are the number zero, so countZeros([0, "", false, 0]) returns 2.
Type error
countVotes(entries) should add up the votes field of every entry and return the numeric total.
Type error
sortNumbers(nums) should return the numbers sorted from smallest to largest.
Type error
average(nums) should return the mean of a list of numbers, including any fractional part.
Type error
calculateTotal(items) should add up the price of every item and return the total, e.g. two items at 10 and 20 gives 30.
Type error
format_price(amount) should return the amount formatted as a price string, e.g. format_price(5) -> "$5".
Type error