const reverse = (str: string) => { return str.split('').reverse().join(''); } console.log(reverse('Hello World'));