The Squiggly Sequence All credits to Adnan for coming up with this challenge.

My last challenge, before I go on break.

Task

Given positive integer n, if n is odd, repeat / that many times; if n is even, repeat \ that many times.

(Seriously, the testcases would be much clearer than this description, so just look at the testcases.)

Specs


Any reasonable input/output format.
Standard loopholes apply.


Testcases

n output
1 /
2 \\
3 ///
4 \\\\
5 /////
6 \\\\\\
Javascript, 22 bytes

n=&gt;"\\/"[n%2].repeat(n)


Defines an anonymous function.

If only * repeated strings in Javascript. sighs