Anybody review my JS solution?
\nvar countMatches = function(items, ruleKey, ruleValue) {\n    let output = 0;\n    items.forEach(item => {\n        switch(ruleKey) {\n            case "type"
```\nvar countMatches = function(items, ruleKey, ruleValue) {\n    let output = 0;\n    items.forEach(item => {\n        switch(ruleKey) {\n            case "type":\n                item[0] === ruleValue && output++;\n                break;\n            case "color":\n                item[1] === ruleValue && output++;\n                break;\n            case "name":\n                item[2] === ruleValue && output++;\n                break;\n        }\n    })\n    return output;\n};\n```\nPlease give a feedback how can I improve this.
['JavaScript']