Answers for "javascript find min and max value in array without array methods"

0

find min and max date in array javascript

const dates = [];
dates.push(new Date('2011/06/25'));
dates.push(new Date('2011/06/26'));
dates.push(new Date('2011/06/27'));
dates.push(new Date('2011/06/28'));
const maxDate = new Date(Math.max.apply(null, dates));
const minDate = new Date(Math.min.apply(null, dates));
Posted by: Guest on January-30-2021
4

find max and min value in array javascript

var numbers = [1, 2, 3, 4];
Math.max(...numbers) // 4
Math.min(...numbers) // 1
Posted by: Guest on May-27-2020

Code answers related to "javascript find min and max value in array without array methods"

Code answers related to "Javascript"

Browse Popular Code Answers by Language