Write a JavaScript program to find the larger number from the two given positive integers, the two numbers are in the range 40..60 inclusive.
function max_townums_range(x, y){
if( (x >= 40) && (x <= 60) && (y >= 40 && y <= 60) ){
if(x === y){
return "Numbers are the same";
}else if (x > y){
return x;
}else{
return y;
}
}else{
return "Numbers don't fit in range";
}
}
console.log(max_townums_range(45, 60));
console.log(max_townums_range(25, 60));
console.log(max_townums_range(45, 80));
function max_townums_range(x, y){
if( (x >= 40) && (x <= 60) && (y >= 40 && y <= 60) ){
if(x === y){
return "Numbers are the same";
}else if (x > y){
return x;
}else{
return y;
}
}else{
return "Numbers don't fit in range";
}
}
console.log(max_townums_range(45, 60));
console.log(max_townums_range(25, 60));
console.log(max_townums_range(45, 80));
Follow Us On Twitter For Amazing Tweets Related To Programming & Web Development π₯π₯π₯
Follow Now ππ
https://twitter.com/CodingMaster6?s=09
Follow Now ππ
https://twitter.com/CodingMaster6?s=09
Some Awesome Free Tools & Resources For Web Developers π₯π₯
1. Jr.DevJobs - Jobs For Junior Developers.
Visit : https://www.jrdevjobs.com/
2. Free CSS - Free CSS has 3133 Free Website Templates , all are free.
Visit : https://www.free-css.com/
3. CSS Stats - Provides analytics & visualization for your style sheets.
Visit : https://cssstats.com/
4. Grid By Example - Everything you need to learn CSS Grid Layout.
Visit : https://gridbyexample.com/
5. Fun-JavaScript-Projects - Learn JS for free in a practical, project based approach.
Visit : https://fun-javascript-projects.com/
1. Jr.DevJobs - Jobs For Junior Developers.
Visit : https://www.jrdevjobs.com/
2. Free CSS - Free CSS has 3133 Free Website Templates , all are free.
Visit : https://www.free-css.com/
3. CSS Stats - Provides analytics & visualization for your style sheets.
Visit : https://cssstats.com/
4. Grid By Example - Everything you need to learn CSS Grid Layout.
Visit : https://gridbyexample.com/
5. Fun-JavaScript-Projects - Learn JS for free in a practical, project based approach.
Visit : https://fun-javascript-projects.com/
Jr.DevJobs
Jobs for Junior Developers