JSFiddle - React, Tailwind, and code Playground

by Salmin Skenderovic

JavaScript

const reverse = (str) => {
	const result = []
	for (let i=str.length-1;i>0;i--) {
		result.push(str[i])
	}
	return result;
}

console.log(reverse("hejsan"))