I created some code to print a rectangle I followed a video but I do not get the logic can someone explain?
HTML (I get this)
<label id="myShape"></label>
<script src="script.js"></script>
JS (I do not get this)
let symbol = window.prompt("Enter a symbol: ");
let rows = window.prompt("Enter the number of rows you want: ");
let collums = window.prompt("Enter the collums you want: ");
for (let a = 0; a <= rows; a++) {
for (let j = 0; j <= collums; j++) {
document.getElementById("myShape").innerHTML += symbol;
}
document.getElementById("myShape").innerHTML += "<br>";
}