NeoGames Interview Question

Write recursive function that reverses a string (for example "time" becomes "emit") a. (Use only core JavaScript.) b. Don't use any reverse or sorting functions