I did not include an if statement in the function yet it gives me an error of if statement Function : export const oneWillDo = (x, y, z) => x | | y | | z
Error message: oneWillDo should NOT contain ANY if statements
The results in the solution.js are correct
gloryarisah
Your code looks good.
There was an error in our tests. Now it's fixed.
Please resubmit the task.
export const oneWillDo = (x, y, z) => { var a = x==true y==true z==true; switch(a){ case true: return true; break; case false: return false; break; }
}
This solution works perfectly
export const oneWillDo = (x, y, z) => { switch (x || y || z) { case true: return true; break; case false: return false; break; } }
Hemerson what if you just wrote return x || y || z?
return x || y || z
Wow... nice, I didn't think about that Coderslang_Master. I like what you did with the one-liner.