Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function illuminatiLock(input) {
- let n = Number(input[0]);
- console.log(`${'.'.repeat(n)}${'#'.repeat(n)}${'.'.repeat(n)}`);
- for (let i = 0; i < n - 1; i += 2) {
- console.log(`${'.'.repeat(n - i - 2)}##${'.'.repeat(i)}#${'.'.repeat(n - 2)}#${'.'.repeat(i)}##${'.'.repeat(n - i - 2)}`);
- }
- for (let i = n - 3; i >= 0; i -= 2) {
- console.log(`${'.'.repeat(n - i - 2)}##${'.'.repeat(i)}#${'.'.repeat(n - 2)}#${'.'.repeat(i)}##${'.'.repeat(n - i - 2)}`);
- }
- console.log(`${'.'.repeat(n)}${'#'.repeat(n)}${'.'.repeat(n)}`);
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement