Read a number, such as 521, change this number to 0521, and put it into four div, how to achieve?

read a number, such as 521

change this number to 0521

but put it into four div separately, how to realize it?

0 < / div >
5 < / div >
2 < / div >
1 < / div >

Feb.26,2021

let n = 521; //
n = (n*1).toString().padLeft(4,'0');
for(let v of n){
  let dom = document.createElement('div');
  dom.innerText = v;
  //dom appendTodom
}
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-1c1d415-33379.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-1c1d415-33379.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?