Skip to content

Commit 58b3ea2

Browse files
committed
check
1 parent 4c44918 commit 58b3ea2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Programs/Exercise/check.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
Write a JavaScript program to check two numbers
3+
and return true if one of the number is 100 or
4+
if the sum of the two numbers is 100
5+
*/
6+
7+
8+
const equalto100 =(a,b)=> a===100 || b===100 || (a+b)===100
9+
10+
console.log( equalto100(100,0))
11+
console.log(equalto100(50,50))
12+
console.log(equalto100(0,100))

0 commit comments

Comments
 (0)