iOS Closures in Swift Building Standard Library Functions Using Filter

Collin Argo
Collin Argo
5,191 Points

Is this challenge broken?

This code works in playground. Why can I not complete the challenge?

filter.swift
let numbers = [10,423,802,765,943,12,405,230,1348,128,237]

let oddNumbers = numbers.filter { $0 % 2 != 0 }

1 Answer

Collin Argo
Collin Argo
5,191 Points

Looks like the constant should actually be named oddValues, despite the error message stating to make sure you're assigning the results of the filter operation to a constant named oddNumbers.