i had seen lots of another examples like
Math.max(...Array1)
or Math.max(null,num)
or Math.max.apply(null,num)
but it's not working by my code
my data size is 255 and This is what the data looks like when i print it by console.log
0: 55.47999954223633
1: 56.040000915527344
2: 57.52000045776367
3: 57.119998931884766
...
Data was extracted from the json file and then put into the array through push.
code is look like this
let Array =[]
jQuery.getJSON( "price.json",function(data){
for(let i=0;i<data.length;i++){
Array.push(data[i].price)
}
let maximum = Math.max(...Array) // not working
Thank you for reading this.