Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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);
Comment

PREVIOUS NEXT
Code Example
Javascript :: check if element has specific child javascript 
Javascript :: cypress input value should be 
Javascript :: change key in array of objects javascript 
Javascript :: js populate an empty array of zeros 
Javascript :: javascript array flat 
Javascript :: reverse every word 
Javascript :: js string to regex 
Javascript :: jquery add remove class timer 
Javascript :: for each jquery 
Javascript :: node js server get images from folder 
Javascript :: javascript hashtag url 
Javascript :: jquery set form target 
Javascript :: alphabet only in jquery 
Javascript :: wordpress ajax file upload 
Javascript :: how to map objects in react native 
Javascript :: react native change app name 
Javascript :: get value of ajax success in variable 
Javascript :: how to get the integer part of a string in javascript 
Javascript :: react native shadow above 
Javascript :: how to do radio button validation in jquery 
Javascript :: remove role discord.js 
Javascript :: using map in useeffect 
Javascript :: string includes substring javascript 
Javascript :: file picker electron 
Javascript :: javascript check if file exists on server 
Javascript :: how to remove middle characters in string javascript 
Javascript :: how to check if a string contains a certain letter in js 
Javascript :: teste 
Javascript :: react history.push 
Javascript :: read json file into object javascript 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =