Beatmix project assistance

Hello everyone, im currently doing the “beatmix” project and I have an issue with one of my functions. I’m not able to make it pass the tests. Any ideas what have i done wrong. Thank you!

function clear (drumType) {
if (drumType !== ‘kicks’ && drumType !== ‘snares’ && drumType !== ‘hiHats’ && drumType !== ‘rideCymbals’) {
switch (drumType) {
case ‘kicks’:
kicks.forEach(step => step = false);
case ‘snares’:
snares.forEach(step => step = false);
case ‘hiHats’:
hiHats.forEach(step => step = false);
case ‘rideCymbals’:
rideCymbals.forEach(step => step = false);
test outcome:
clear() function
✓ should exist and be a function
✓ should perform no array mutation when called with no arguments
✓ should not perform any mutation when called with an invalid array name

  1. mutates only a single array at a time
  2. should set all values in an array to false when called with a valid array name

So far you’re only stating that the test fails. But have you read what the test says fails? Have you read the test code itself? PASS/FAIL is not the only information you have, take a look at the other information as well.

A start might be to test your function yourself in the way that the failed test describes. Reproduce the problem and observe it, compare to what you meant should have happened, in what way is it different, what part of your code is responsible for that, how can you adjust it?