What do you mean, false); after the function in JS?

Encountered in the code with this and don't understand what this value does :/

Here is the code:
initAlarm function() {
alarmSound.play();
 alarmSound.addEventListener('ended', function() {
 this.currentTime = 0;
this.play();
}, false);
 document.getElementById("alarmOptions").style.display=""; // displays two buttons
}
June 3rd 19 at 19:41
2 answers
June 3rd 19 at 19:43
Solution
The third parameter to the function addEventListener
alarmSound.addEventListener('ended', function() {}, false);

To make it clearer, this code can be written as
function eventAction() {
this.currentTime = 0;
this.play();
}
initAlarm function() {
alarmSound.play();
 alarmSound.addEventListener('ended', eventAction, false);
 document.getElementById("alarmOptions").style.display=""; // displays two buttons
}
June 3rd 19 at 19:45
Nothing, this is false
(Couldn't resist)
It's not that - roma commented on June 3rd 19 at 19:48

Find more questions by tags JavaScriptWeb Development