1let n = 5; // you can take input from prompt or change the value2let string = "";
3for (let i = 0; i < n; i++) {
4// printing star5for (let k = 0; k < n - i; k++) {
6 string += "*";
7 }
8 string += "\n";
9}
10console.log(string);
you will get a confirmation link on this - you will have to click that for successful submission of your answer. we require this to keep the website free of spam, bots and unhelpful content
please ensure to add code which is syntactically corrent and executes properly
you will get a confirmation link on this - you will have to click that for successful submission of your question. we require this to keep the website free of spam, bots and unhelpful content