Skip to content

Instantly share code, notes, and snippets.

@ldco2016
Created November 12, 2017 22:29
Show Gist options
  • Select an option

  • Save ldco2016/9913e1e9579efabd188d706611c4e762 to your computer and use it in GitHub Desktop.

Select an option

Save ldco2016/9913e1e9579efabd188d706611c4e762 to your computer and use it in GitHub Desktop.
function main() {
var n = parseInt(readLine());
for (i = 1; i <=n; i++){
line = Array(n).fill(' ');
for (j = 0; j < i; j++){
line[j] = '#';
}
console.log(line.reverse().join(''))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment