var where = document.createElement(div);
function myFunction() {
for(var i=0; i<=9999; i++){
var p = document.createElement("p");
var b = i/10000;
b=b.toFixed(4)
p.innerText = setDecimal(b);
where.appendChild(p);
}
function setDecimal(num) {
var str = "" + num;
var zeroPos = str.indexOf(".")+1;
if (zeroPos == -1) return 0;
str = str.slice(zeroPos);
return str;
}