Answers for "javascript compare 2 numbers"

1

Javascript how to compare three numbers

function compare(num1, num2, num3) {
	if (num3 > num2 && num1 > num3) {
		return num1 + ' is the biggest number';
	} else if (num2 > num1 && num2 > num3) {
		return num2 + ' is the biggest number';
	} else {
		return num3 + ' is the biggest number';
	}
}
var results = compare(10, 20, 30);
console.log(results);
Posted by: Guest on April-10-2021
0

if between two numbers javascript

if (500 < thenumber && thenumber < 600) {
  // ...
}
Posted by: Guest on August-03-2020

Code answers related to "javascript compare 2 numbers"

Code answers related to "Javascript"

Browse Popular Code Answers by Language