function reverse(string) {
// Base case
if (string.length < 2) return string;
// Recursive case
return reverse(string.slice(1, string.length)) + string[0];
}
function reverse (str) {
if (str === "") {
return "";
} else {
return reverse(str.substr(1)) + str.charAt(0);
}
}