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