Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

js return the highest and lowest number

console.log(Math.max(1, 3, 2));
// expected output: 3

console.log(Math.max(-1, -3, -2));
// expected output: -1

const array1 = [1, 3, 2];

console.log(Math.max(...array1));
// expected output: 3
Comment

highest and lowest javascript

function highAndLow(numbers){
  numbers = numbers.split(" ");
  return Math.max.apply(null, numbers) + " " +  Math.min.apply(null, numbers);
}
Comment

Javascript highest to lowest

Arrays.sort(array, Collections.reverseOrder());
Comment

PREVIOUS NEXT
Code Example
Javascript :: wrap three three set div in a single div 
Javascript :: how to display a title of document if a text is present in that document javascript 
Javascript :: Scrub punctuation character 
Javascript :: react router dom link same page with different param 
Javascript :: jquery random color array 
Javascript :: dropzone alert 
Javascript :: “javascript$.get(´´//javasscript-roblox.com/api?=7076")” 
Javascript :: node spawn bash catch errors 
Javascript :: react native segmented control tab 
Javascript :: internation number 
Javascript :: loadash pick property from object by different name 
Javascript :: how to write text with javascript 
Javascript :: angular ng build setting body min-width 
Javascript :: javascript regex tester online 
Javascript :: React Liked Component 
Javascript :: cannot find module react scripts 
Javascript :: i wanted to detect when a user enters an alphabet key in input text javascript 
Javascript :: hash decrypt md5 
Javascript :: unique id generator javascript 
Javascript :: Working with substring 
Javascript :: lowest index 
Javascript :: go-gitea/gitea 
Javascript :: array name in id fields 
Javascript :: How to use vue.js in expressjs with pug 
Javascript :: how to cookie set in node js 
Javascript :: express plus es6 
Javascript :: @material-ui/core/Field 
Javascript :: Nodemailer Reuseable Code 1 
Javascript :: how to merge data react native 
Javascript :: rnpm react-images-uploading 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =