1
I made this array but I can’t get the commas out and swap them out for two or three spaces. Someone has 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
INTENDED RESULT WITH 1 OR MORE SPACES: 3 12 9 7
Thanks but I only managed to put 1 space.. I can’t get 2 or 3 spaces?
– user110243
Try again, with this response change.
– Pedro Paulo
Exactly. That’s right. I’m very grateful.
– user110243
If the answer helped you and can help other people please mark it as accepted answer please. Thank you :D
– Pedro Paulo
OK.. I clicked on the check mark and went to green color.
– user110243
Thank you very much!
– Pedro Paulo