js/scripts.js
//function to check if a color is in the given array and to return how many times it is
function to check if a color is in the given array and to return how many times it is
function to check if a color is in the given array and to return how many times it is
function numberInArray(hexArray, color){
  let occurances = 0;
  hexArray.forEach(function(element){
    if(element === color){
      occurances++;
    }
  });
  return occurances
}
function numberInArray ( hexArray , color ) { let occurances = 0 ; hexArray . forEach ( function ( element ) { if ( element === color ) { occurances ++ ; } } ) ; return occurances }
function to check if a color is in the given array and to return how many times it is
function to check if a color is in the given array and to return how many times it is