Skip to main content
5 of 8
98 => 97 bytes
rgajrawala
  • 737
  • 8
  • 23

Javascript (ES6), 107 104 100 98 97 bytes

p=>{s=Array(++p).join`/\\`+`
`;for(i=p;i>2;)o=Array(i--).join`/ `+`
`,s+='\\'+o+o;return s+'\\/'}

First post here!

Uses Array(len).join(str), similar to Ruby's operator*(str,len).

Ungolfed:

len => {
    var str = Array(++len).join `/\\` + '\n';

    for (var i = len; i > 2; ) {
        var mid = Array(i--).join `/ ` + '\n';
        str += '\\' + mid + mid;
    }

    return str + '\\/';
}

_Thanks!
107 => 104 bytes: [@insertusernamehere](http://codegolf.stackexchange.com/users/41859/insertusernamehere)_
rgajrawala
  • 737
  • 8
  • 23