I'm doing some exercises and one of them asks me to create a code that reproduces an "ASCII art", I read about it and saw it was a special character and tried to insert space in its unicode form "\ s", "\ u0020 ",but without success. I saw some people talking about using regular expressions. Thanks in advance
<script>
document.write("XXXXX<br>");
for (var i =0;i<2;i++){
document.write("X X<br>")
};
document.write("XXXXX<br>");
</script>
XXXXX
X X
X X
XXXXX