summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'index.html')
-rw-r--r--index.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/index.html b/index.html
index 240fe0a..17aac81 100644
--- a/index.html
+++ b/index.html
@@ -49,7 +49,8 @@
document.getElementById("showBpm").innerHTML = 0;
}
function display(bpm) {
- document.getElementById("showBpm").innerHTML = Math.round(median(bpm));
+ /* slice() copies by value, not by reference, so the median() doesn't mess with the array */
+ document.getElementById("showBpm").innerHTML = Math.round(median(bpm.slice()));
}
window.addEventListener("load",function() {
var lastClick = 0;
@@ -58,7 +59,6 @@
var d = new Date();
var t = d.getTime();
var seconds = ( t - lastClick ) / 1000;
- console.log(seconds)
if ( 0 != lastClick ) {