Execution order of js operation DOM and other JS code in browser

the following code:

document.querySelector(".div-bgd").style.display = "block";
document.querySelector(".load_div").style.display = "block";
console.log(1)
alert(1)
In the

browser environment, why execute console and alert statements first instead of the first two statements that have changed styles?
examples are as follows:

Mar.12,2021

learn the execution order of js engine threads and GUI rendering threads
setTimeout solves the problem of GUI rendering thread blocking

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e88918-46ccb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e88918-46ccb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?