• + 2 comments

    var i = 1;

    while (i <= n) {

    console.log( " ".repeat( n-i ) + "#".repeat( i ) );

    i++;

    }

    I just did it with this.