Covid_AppScript_Email_Blaster.js
// Calculate the rate of change in cases.
Calculate the rate of change in cases.
Calculate the rate of change in cases .
function change(curr, prev) {
  if (prev === 0 && curr > 0) return Number.MAX_VALUE;
  else if (prev === 0 && curr === 0) return 0
  else return (((curr-prev)/prev) * 100).toFixed(2);
}
function change ( curr , prev ) { if ( prev === 0 && curr > 0 ) return Number . MAX_VALUE ; else if ( prev === 0 && curr === 0 ) return 0 else return ( ( ( curr - prev ) / prev ) * 100 ) . toFixed ( 2 ) ; }
Calculate the rate of change in cases.
Calculate the rate of change in cases .