I made this array but I can not get the commas out and replace them with two or three spaces. Does anyone have an idea to help me please?
<div id="demo1" name="demo1" style="margin-left: 100px; margin-top:25px;color:red; font-size:16px; font-weight:bold; letter-spacing: 00px;">
<script>
var arr = []
while(arr.length < 4){
var r = Math.floor(Math.random()*16) + 1;
if(arr.indexOf(r) === -1) arr.push(r);
}
document.write(arr);
</script>
</div>
EXAMPLE OF THE RESULT: 3,12,9,7
RESULT INTENDED FOR 1 OR MORE SPACES: 3 12 9 7