I am currently trying to write a program using JavaScript that will generate an 'X'. I am facing challenges in starting the code and deciding what commands to include in each line.
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<font face="Courier New">
<body>
<h1>Trying..</h1>
<font face='Courier New'>
<script>
for (var row = 1; row < 5; row++) {
for (var col = 0; col < max; col++) } {
if (row===col || row + col===size-1) {
document.write ('*')
else
document.write ('&Nbsp')
}
</script>
</font>
</body>
</html>
This is my work-in-progress. I would greatly appreciate any assistance or guidance!