javascript get html slider value

HTML
var x = document.getElementById("myRange").value
Source

Also in HTML: