Created
December 22, 2016 11:52
-
-
Save Arieg419/ce4079e50c73a53fa4732362ef0dcd6a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The following is a "driver" file for your TempTracker.js class. | |
The TempTrackers class you are creating should support all of these methods, | |
and return the values commented out, at the end of every console.log function call. | |
*/ | |
var tmp = new tempTracker(); | |
tmp.insert(1); | |
tmp.insert(2); | |
tmp.insert(3); | |
tmp.insert(4); | |
tmp.insert(5); | |
tmp.insert(6); | |
tmp.insert(13); | |
tmp.insert(13); | |
tmp.insert(13); | |
tmp.insert(13); | |
tmp.insert(13); | |
tmp.insert(13); | |
var res = tmp.getMean(); | |
console.log(res); // 8.25 | |
res = tmp.getMode(); | |
console.log(res); // 13 | |
res = tmp.getMax(); | |
console.log(res); // 13 | |
res = tmp.getMin(); | |
console.log(res); // 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment