Skip to content

Instantly share code, notes, and snippets.

@yaasita yaasita/reverse.js
Created Jan 4, 2017

Embed
What would you like to do?
(function () {
var reverse = [];
var elm1 = document.querySelector('#archives').querySelectorAll("li");
var i=0;
for(i=0;i<=elm1.length-1;i++){reverse.unshift(elm1[i].innerHTML)}
for(i=0;i<=elm1.length-1;i++){elm1[i].innerHTML=reverse[i]}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.