weather/js/function.js
// This function will calculate the wind chill temperature
This function will calculate the wind chill temperature
This function will calculate the wind chill temperature
function buildWC(speed, temp){
const feelTemp = document.getElementById('feelTemp');
  let wc = 35.74 + 0.6215 * temp - 35.75 * Math.pow(speed, 0.16) + 0.4275 * temp * Math.pow(speed, 0.16);
  console.log(wc);
  wc = Math.floor(wc);
  wc = (wc > temp)?temp:wc;
console.log(wc);
  wc = wc; 
feelTemp.innerHTML = wc;
}
function buildWC ( speed , temp ) { const feelTemp = document . getElementById ( 'feelTemp' ) ; let wc = 35.74 + 0.6215 * temp - 35.75 * Math . pow ( speed , 0.16 ) + 0.4275 * temp * Math . pow ( speed , 0.16 ) ; console . log ( wc ) ; wc = Math . floor ( wc ) ; wc = ( wc > temp ) ? temp : wc ; console . log ( wc ) ; wc = wc ; feelTemp . innerHTML = wc ; }
This function will calculate the wind chill temperature
This function will calculate the wind chill temperature
//calculate windchill //Round the answer down to integer //If windchill is greater than temp, return the temp //display the windchill //'feels like: ' +  //+ '&deg; F';