Find the biggest number in array by using javascript loops : create a function called biggestNumberInArray() 

that takes an array as a parameter and returns the biggest number.


Here is an array
      
    const array = [-1,0,3,100, 99, 2, 99]
What i try in my JS:
       
     function biggestNumberInArray(arr) {
       for (let i = 0; i < array.length; i++) {
          for(let j=1;j<array.length;j++){
		      for(let k =2;k<array.length;k++){
			      if(array[i]>array[j] && array[i]>array[k]){
				        console.log(array[i]);
			   }
		     }
		  }
	   }
    }


it returns 3 100 99.

I want to return just 100 because it is the biggest number.

Is there any improve ways to use loops to get the biggest value? 