JSFiddle - React, Tailwind, and code Playground
JavaScript
c = x = y = ''
ReversesreveR = s =>
[...s].map(b=>b>-1?c?y=b+y:x=b+x:c=b)|
c>']' ? Math.pow(x,y) : eval(+x +c+ +y)|0
/*
r = /[^\d]/
function ReversesreveR(s) {
m = s.split(r).map(x=>+[...x].reverse().join(""))
c = s.match(r)[0]
return c=='^' ? Math.pow(m[0],m[1]) : eval(m[0] +c+ m[1])|0
}
*/