The problem of successive execution of js function

The

situation is like this. A page has evaluation module, details module, and image module . The backend sets up three corresponding APIs respectively, because the whole page builds the dom template from the details module, that is, the image and the evaluation backend will each return a data, which needs me to fill in the details module. Is there any way for me to call the ajax method of the evaluation and then the ajax of the image? finally then summarize the two important data into the details of the core module? Is there any way to let the first two functions execute first and get the results I want before continuing with the last function?
here"s what I wrote:
does this method guarantee that getPic,getEva is executed first?

function getDetali(){  //
getPic()//
getEva()//
if(xxxxx){
   showDetail() //
}
}
Mar.06,2021

promise


callback:

   
is this a callback function? In some cases, getDeatil (getEvaluation) is called at the beginning of page loading without screenshots.

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-1eb2395-470fc.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-1eb2395-470fc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?