export function countMatches(items: string[], target: string): number { let count = 0; for (const item of items) { // TODO: update count only when item matches target. } return count; } console.assert(countMatches(["coin", "trap", "coin"], "coin") === 2); console.assert(countMatches(["trap"], "coin") === 0); console.assert(countMatches([], "coin") === 0);