Implement the function oneWillDo
in helper.js
. It should accept 3 boolean parameters (x, y, z) and
- return
true
, if at least one of them istrue
- return
false
otherwise
The function oneWillDo
should NOT contain any if
statements
This task is part of the Full-Stack JavaScript Course
If you have any issues with it, you can ask for community help below the post
Feel free to help others if you’ve already solved the task
helper.js
export const oneWillDo = (x, y, z) => {
return true;
}
solution.js
import { oneWillDo } from './helper.js';
console.log(oneWillDo(true, true, true)); // true
console.log(oneWillDo(true, false, false)); // true
console.log(oneWillDo(false, false, false)); // false