JSFiddle - React, Tailwind, and code Playground

HTML

<nav>
  <a href="home.html">home</a>
  <a href="about.html">about</a>
  <a href="more.html">more</a>
  <a href="contact.html">contact</a>
</nav>

JavaScript

var n = document.querySelector("nav");
var max = n.children.length;
var arrReverse = [];

for(i = (max - 1); i > -1; i -= 1) {
  arrReverse.push(n.children[i]);
}

for(j = 0; j < max; j += 1) {
  // console.log(arrReverse[j].innerHTML);
  n.children[j].innerHTML = arrReverse[j].innerHTML;
  n.children[j].href = arrReverse[j].href;
}