0
Write a JavaScript program to check two numbers and return true if one of the number is 100 or if the the sum of the two numbers
const isEqualTo100 = (a,b) => a === 100 || b === 100 || (a+b) === 100; Is this Correct?
2 ответов
0
I checked with this values.
console.log(isEqualTo100(100,0));
console.log(isEqualTo100(0,100));
console.log(isEqualTo100(10,0));
console.log(isEqualTo100(0,10));
console.log(isEqualTo100(50,50));
console.log(isEqualTo100(40,60));
console.log(isEqualTo100(100,100));
I'm getting this result:
true
true
false
false
true
true
true // I have problem with this result it should be false because both are 100 ?