Go to site index page

JS Prac Ex

Task: Write a javascript programme to check two numbers and return true of one of the numbers is one hundred, or if the sum of the two numbers is one hundred.




My solution:

Enter two numbers.




The tutorial suggested solution is purely javascript and does not interact with screen input or show on screen.
It looks like this:

const isEqualTo100 = (a,b) => a === 100 || b === 100; || (a +b) === 100;