I want the star pattern to be printed in the middle without changing the design [closed]

I want the output in the middle without changing the pattern.

<script>
function start(){
 
    let string = "";
    for (let j = 0; j<= 5; j++) {
       for (let i = 0; i < j; i++){
        string += " *";
      }
      string += "<br>";
    }
    
document.getElementById("result").innerHTML+=string;
}
window.onload = start;

</script>