Javascript Average Number In Array Python Methods Explained Java