Two people are trying to determine if they are compatible as friends and there is one criteria that is very important to both of them
Two people are trying to determine if they are compatible as friends and there is one criteria that is very important to both of them and they must agree on this issue. Conveniently they are able to represent their views as integers and have also determined a boundary integer to determine which side of the issue they are on.
Write a function named "same_side" that takes two integers as parameters. The function will return a boolean which represents true if the inputs are both greater than 45 or if they are both less than 45. If the inputs are not on the same side of 45 or if either input is equal to 45 then the function should return a value representing false.
IN JAVASCRIPT
Step by Step Solution
3.37 Rating (144 Votes )
There are 3 Steps involved in it
Step: 1
JAVASCRIPT CODE function samesidea b ifa 36 b 36 a ...See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started