Does anyone know how to get Mean Median and Mode in Javascript? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Does anyone know how to get Mean Median and Mode in Javascript?

hey guys just need an advice on how to create a Mean Median Mode based on inputs. Thank You!

28th Jun 2017, 1:14 PM
Teddy Pascual
Teddy Pascual - avatar
7 Answers
+ 8
It will do. I think there might be better code for get mode. https://code.sololearn.com/W0igg711k8d7/?ref=app
28th Jun 2017, 1:49 PM
김정제(Legacy)
김정제(Legacy) - avatar
+ 3
https://code.sololearn.com/WDaxbKsDI4bH/?ref=app
28th Jun 2017, 2:46 PM
Calviղ
Calviղ - avatar
+ 1
Thank You Very Much!
28th Jun 2017, 2:32 PM
Teddy Pascual
Teddy Pascual - avatar
+ 1
Here you go: https://code.sololearn.com/WJQ6Yi3jCAo1/?ref=app I built it in rush, with little testing. Do let me know if there is calculation errors. If no mode in the values, the mode value should show "no value". But current code shows a value which can be ignored. Edited: mode can show "no value" now if no duplicate value occurred.
28th Jun 2017, 3:46 PM
Calviղ
Calviղ - avatar
+ 1
ok thanks bro :)
28th Jun 2017, 4:19 PM
Teddy Pascual
Teddy Pascual - avatar
0
Thank You!
28th Jun 2017, 2:57 PM
Teddy Pascual
Teddy Pascual - avatar
0
how about based on the User' input?
28th Jun 2017, 2:58 PM
Teddy Pascual
Teddy Pascual - avatar