JSFiddle - React, Tailwind, and code Playground

by Paco86

JavaScript

var s = 'abc';

var temp;
for (var i = 0, j = s.length - 1; i < j; i++ ,j--) {
	temp = s[i];
  s[i] = s[j];
  s[j] = temp;
}

alert(s);