String.prototype.revers = function() {
var recurs = function (s, len, z) {
(len === 0) ? z : recurs(s, --len, z.push(s.charAt(len)))
};
return recurs(this, this.length, new Array());
};
console.log("mystring".revers());
Uncaught TypeError: z.push is not a function
String.prototype.reverse = function() {
return [...this].reverse().join('');
};