Skip to content

Instantly share code, notes, and snippets.

@daGrevis
Created April 24, 2019 12:46
Show Gist options
  • Save daGrevis/bacf95445c3e61afbff5bd2ff1fda51c to your computer and use it in GitHub Desktop.
Save daGrevis/bacf95445c3e61afbff5bd2ff1fda51c to your computer and use it in GitHub Desktop.
for (let i = 0; i < 10; i++) {
for (let j = 0; j < 10; j++) {
const isFilled =
i === 0 ||
i === 9 ||
j === 0 ||
j === 9 ||
i === j ||
i === 9 - j
process.stdout.write(isFilled ? '#' : ' ')
if (j === 9) {
console.log()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment