Skip to content

Instantly share code, notes, and snippets.

@the-creature
Created October 3, 2017 06:42
Show Gist options
  • Save the-creature/c110a5ffbf4006dc3c29bb33aad74eb5 to your computer and use it in GitHub Desktop.
Save the-creature/c110a5ffbf4006dc3c29bb33aad74eb5 to your computer and use it in GitHub Desktop.
const C = [16, 9, 12, 4, 4, 3, 4, 7, 6, 4, 12, 15, 4, 11, 12, 15, 8, 12, 10, 10];
const F = C.map(n => Math.round(n * (9/5)) + 32);
// [61, 48, 54, 39, 39, 37, 39, 45, 43, 39, 54, 59, 39, 52, 54, 59, 46, 54, 50, 50]
const avg = F.reduce((s, e) => s + e, 0) / F.length; //48.05
Math.round(avg) // 48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment