Pregunta de entrevista de Tesla

codility test on react,and java script, with fraction numbers.