Answers for "reverse Star pattern in javascript"

0

reverse Star pattern in javascript

let n = 5;
let string = "";
for (let i = 0; i < n; i++) {
  // printing star
  for (let k = 0; k < n - i; k++) {
    string += "*";
  }
  string += "\n";
}
console.log(string);
Posted by: Guest on September-17-2021

Code answers related to "reverse Star pattern in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language