const orderList = [3, 1, 2, 0];
const ul = document.querySelector('#list');
const li = ul.querySelectorAll('li');
ul.append(...orderList.map(i => li[i]));
<ul id="list">
<li>0</li>
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…