doSome();
async function doSome(){
console.log('1')
fyn();
console.log('2')
}
async function fyn(){
return sleep(1000);
}
async function sleep(milliseconds) {
return new Promise((resolve) => setTimeout(() => resolve(), milliseconds));
}
<form method="post" action="/news/priority/<id новости>">
<input type="hidden" name="priotiy_add" value="1">
<button class="arrow-up" type="submit"></button>
</form>
<form method="post" action="/news/priority/<id новости>">
<input type="hidden" name="priotiy_add" value="-1">
<button class="arrow-down" type="submit"></button>
</form>