6 of 8
97 => 91 bytes. Use `.repeat()`.
rgajrawala
  • 727
  • 7
  • 22

Javascript (ES6), 107 104 100 98 97 91 bytes

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

First post here!

Used to use Array(len).join(str) but now uses String.repeat(len), similar to Ruby's operator*(str,len).

Ungolfed:

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

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

    return str + '\\/';
}

_Thanks to:_
_107 => 104 bytes: [@insertusernamehere](http://codegolf.stackexchange.com/users/41859/insertusernamehere)_
_97 => 91 bytes: [@user81655](http://codegolf.stackexchange.com/users/46855/user81655)_
rgajrawala
  • 727
  • 7
  • 22