Created
August 29, 2019 10:34
-
-
Save luminous8/e3f1e36d3290c06a795877c02b572cb1 to your computer and use it in GitHub Desktop.
Average movie rating on Allociné
This file contains 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
const notes = document.querySelectorAll('.stareval-note'); | |
arrNotes = []; | |
leSum = 0; | |
for (var i = 0; i < notes.length; i++) { | |
const noteInt = parseInt(notes[i].innerText, 10); | |
arrNotes.push(noteInt); | |
leSum += noteInt | |
} | |
console.log(`Sur ${arrNotes.length} films & series la moyenne est de ${leSum / arrNotes.length}`) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment