I wanted to have a switch/case statement that accepts an object in Javascript.
The function looks like this.
const validate = (values) => { valu
You are using it like a function parameter which is unnecessary (and wrong). Since switch statements check that the value equals the case, you'll want to use:
switch(true)