Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- let n = prompt("enter number", "");
- let col,row;
- for (row = 1; row <= n; row++){
- for (space = n; space >= (n-row); space--){
- document.write(" ");
- }
- for(col = n-1; col >= row; col--)
- {
- document.write ("*" + " ");
- }
- document.write("<br>");
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement