Skip to main content
1 of 2
AdmBorkBork
  • 43.7k
  • 5
  • 107
  • 288

PowerShell, 21 bytes

1..$args[0]|%{'*'*$_} 

Loops from 1 to input $args[0], each iteration using string multiplication to construct a string of that many $_ asterisks. Default behavior for the implicit Write-Output at the end is with a newline for separator, so we get that for free.

PS C:\Tools\Scripts\golfing> .\draw-asterisk-pattern.ps1 5 * ** *** **** ***** PS C:\Tools\Scripts\golfing> .\draw-asterisk-pattern.ps1 2 * ** PS C:\Tools\Scripts\golfing> .\draw-asterisk-pattern.ps1 7 * ** *** **** ***** ****** ******* 
AdmBorkBork
  • 43.7k
  • 5
  • 107
  • 288