title: Find the biggest number in an array by using JavaScript loops
body: <p>Create a function called biggestNumberInArray().</p>
  <p>That takes an array as a parameter and returns the biggest number.</p>
  <p>Here is an array</p>
  <pre><code>const array = [-1, 0, 3, 100, 99, 2, 99]
  </code></pre>
  <p>What I try in my JavaScript code:</p>
  <pre><code> function biggestNumberInArray(arr) {
     for (let i = 0; i &lt; array.length; i++) {
        for(let j=1;j&lt;array.length;j++){
            for(let k =2;k&lt;array.length;k++){
                if(array[i]&gt;array[j] &amp;&amp; array[i]&gt;array[k]){
                      console.log(array[i]);
             }
           }
        }
     }
  }
  </code></pre>
  <p>It returns 3 100 99.</p>
  <p>I want to return just 100 because it is the biggest number.</p>
  <p>Is there a better way to use loops to get the biggest value?</p>
  <p>Using three different JavaScript loops to achieve this (for, forEach, for of, for in).</p>
  <p>You can use three of them to accomplish it.</p>