[Solved] how to reverse a string that is identified as an id in javascript?

[ad_1]

This is pretty simple…

function reverse(tag) {
  var el = document.getElementById(tag);
  if(!el) {
    return alert('nope');
  }
  el.innerHTML = el.innerHTML.split('').reverse().join('');
}

1

[ad_2]

solved how to reverse a string that is identified as an id in javascript?