Skip to main content
added 199 characters in body
Source Link
user100752
user100752

JavaScript (Node.js), 6356 bytes

n=>[...m=ArrayArray(n)].map((_,x,a)=>[...m]=>a.map((_,by)=>-~a>++b=>x>y++?-~a~x:by))

Try it online!Try it online!

Outputs an array of arrays.

Thanks to Shaggy for -5 bytes

Thanks to Arnauld for further -2 bytes

JavaScript (Node.js), 7871 bytes

n=>[...m=ArrayArray(n)].map((_,x,a)=>[...m]=>a.map((_,by)=>-~a>++b=>x>y++?-~a~x:by).join``).join`
`

Try it online!Try it online!

Outputs string

History

n=>[...Array(n)].map((_,x,a)=>a.map((_,y)=>-~x>++y?-~x:y)) // 58

n=>[...m=Array(n)].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b)) // 63

n=>[...(m=Array(n))].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b)) // 65

n=>[...(m=Array(n)).keys()].map(a=>[...m.keys()].map(b=>-~a>++b?-~a:b)) // 71

JavaScript (Node.js), 63 bytes

n=>[...m=Array(n)].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b))

Try it online!

Outputs an array of arrays.

JavaScript (Node.js), 78 bytes

n=>[...m=Array(n)].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b).join``).join`
`

Try it online!

Outputs string

History

n=>[...(m=Array(n))].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b)) // 65

n=>[...(m=Array(n)).keys()].map(a=>[...m.keys()].map(b=>-~a>++b?-~a:b)) // 71

JavaScript (Node.js), 56 bytes

n=>[...Array(n)].map((_,x,a)=>a.map((_,y)=>x>y++?-~x:y))

Try it online!

Outputs an array of arrays.

Thanks to Shaggy for -5 bytes

Thanks to Arnauld for further -2 bytes

JavaScript (Node.js), 71 bytes

n=>[...Array(n)].map((_,x,a)=>a.map((_,y)=>x>y++?-~x:y).join``).join`
`

Try it online!

Outputs string

History

n=>[...Array(n)].map((_,x,a)=>a.map((_,y)=>-~x>++y?-~x:y)) // 58

n=>[...m=Array(n)].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b)) // 63

n=>[...(m=Array(n))].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b)) // 65

n=>[...(m=Array(n)).keys()].map(a=>[...m.keys()].map(b=>-~a>++b?-~a:b)) // 71
deleted 6 characters in body
Source Link
user100752
user100752

JavaScript (Node.js), 63 bytes

n=>[...m=Array(n)].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b))

Try it online!

Outputs an array of arrays.

JavaScript (Node.js), 78 bytes

n=>[...m=Array(n)].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b).join``).join`
`

Try it online!

Outputs string

History

n=>[...(m=Array(n))].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b)) // 65

n=>[...(m=Array(n)).keys()].map(a=>[...m.keys()].map(b=>-~a>++b?-~a:b)) // 71

JavaScript (Node.js), 63 bytes

n=>[...m=Array(n)].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b))

Try it online!

Outputs an array of arrays.

JavaScript (Node.js), 78 bytes

n=>[...m=Array(n)].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b).join``).join`
`

Try it online!

Outputs string

JavaScript (Node.js), 63 bytes

n=>[...m=Array(n)].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b))

Try it online!

Outputs an array of arrays.

JavaScript (Node.js), 78 bytes

n=>[...m=Array(n)].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b).join``).join`
`

Try it online!

Outputs string

History

n=>[...(m=Array(n))].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b)) // 65

n=>[...(m=Array(n)).keys()].map(a=>[...m.keys()].map(b=>-~a>++b?-~a:b)) // 71
deleted 6 characters in body
Source Link
user100752
user100752

JavaScript (Node.js), 6563 bytes

n=>[...(m=Array(n))].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b))

Try it online!Try it online!

Outputs an array of arrays.

JavaScript (Node.js), 8078 bytes

n=>[...(m=Array(n))].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b).join``).join`
`

Try it online!Try it online!

Output as aOutputs string

JavaScript (Node.js), 65 bytes

n=>[...(m=Array(n))].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b))

Try it online!

Outputs an array of arrays.

JavaScript (Node.js), 80 bytes

n=>[...(m=Array(n))].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b).join``).join`
`

Try it online!

Output as a string

JavaScript (Node.js), 63 bytes

n=>[...m=Array(n)].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b))

Try it online!

Outputs an array of arrays.

JavaScript (Node.js), 78 bytes

n=>[...m=Array(n)].map((_,a)=>[...m].map((_,b)=>-~a>++b?-~a:b).join``).join`
`

Try it online!

Outputs string

deleted 24 characters in body
Source Link
user100752
user100752
Loading
Source Link
user100752
user100752
Loading