Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function catWatch(input) {
- let n = Number(input);
- for (let i = 1; i <= n - 2; i++) {
- console.log(`${' '.repeat(n)}||${'_'.repeat(n - 2)}||${' '.repeat(n)}`);
- }
- console.log(`${' '.repeat(n - 1)}//${' '.repeat(n)}\\\\${' '.repeat(n - 1)}`);
- for (let i = 1; i <= n - 4; i++) {
- console.log(`${' '.repeat(n - 2)}||${' '.repeat(n + 2)}||${(i === Math.floor((n - 3) / 2) ? ']' : '')}`);
- }
- console.log(`${' '.repeat(n - 1)}\\\\${' '.repeat(n)}//${' '.repeat(n - 1)}`);
- for (let i = 1; i <= n - 2; i++) {
- console.log(`${' '.repeat(n)}||${'_'.repeat(n - 2)}||${' '.repeat(n)}`);
- }
- }
Add Comment
Please, Sign In to add comment