Printing pattern in reverse order

 for(let i=5;i>0;i--)

{

  let stars = ""

  for(let j=0;j<i;j++)

  {

    stars = stars + "*"

    

  }

  console.log(stars)

}

Comments

Popular posts from this blog