0
   

Find biggest number in an array

 
 
Nanashi
 
Reply Fri 19 Sep, 2014 05:38 am
Hello.
How can I find the biggest number in an array? And display it with an alert function?
Here's my javascript:

$(document).ready(function() {
$("#array").click(function() {
var numbers = new Array["1", "7", "10", "12", "15"]
var max_of_array = Math.max.apply(Math, array);
alert(arr.max());
});
});

/Thanks
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 660 • Replies: 0
No top replies

 
 

Related Topics

 
  1. Forums
  2. » Find biggest number in an array
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 04/26/2024 at 08:01:57