Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Prodentim Probiotics Specially Designed For The Health Of Your Teeth And Gums

Instant Grammar Checker - Correct all grammar errors and enhance your writing

Teach Your Child To Read

Powerful WordPress hosting for WordPress professionals

Disclosure: My content contains affiliate links.

31,038 questions

40,788 answers

573 users

How to get the min and max values of an array in Node.js

1 Answer

0 votes
const arr = [0.2, 0.5, 0.009, 0.04, 0.1, 0.08, 0.17];

const min = Math.min(...arr);
console.log(min); 

const max = Math.max(...arr);
console.log(max); 

  
  
  
  
/*
run:
  
0.009
0.5
  
*/

 





answered Jul 9, 2022 by avibootz

Related questions

1 answer 47 views
1 answer 49 views
1 answer 44 views
1 answer 69 views
...