PHP Classes

File: js/findMax.js

Recommend this page to a friend!
  Classes of bamigboye biodun   Logical Functions   js/findMax.js   Download  
File: js/findMax.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Logical Functions
General-purpose PHP and JavaScript functions
Author: By
Last change:
Date: 1 year ago
Size: 470 bytes
 

Contents

Class file image Download
const findMaximumNumber = arrayOfNumbers => { let maximumNumber = Number.NEGATIVE_INFINITY; for (let num of arrayOfNumbers) if (num > maximumNumber) maximumNumber = num; return maximumNumber; } //-- Usage findMaximumNumber([1, 5, 7, 10, 12, -5, 23, 29, 22, 20, 18, 7]) // returns 29 /* Author : Biodun Bamigboye This function recieves an array of numbers and returns the Highest of all the Numbers */