I am teaching myself javascript and still with beginner level. I was wondering how can we get the values of variables 'doodlerBottom' and 'doodlerLeft' at the end of the while loop. This topic has been widely discussed and I have tried many solutions without success..I always get the values doodlerBottom=510 and doodlerLeft=0 while I need the values after the while loop. May somebody help me understand and show me the possible solution. this is a part of the code
function createDoodler(){
    isFirstJump = true 
    isPlaying = false 
    doodlerBottom = 510
    doodlerLeft = 0
    newDoodler = new Doodler(doodlerBottom,doodlerLeft)   
    async function load(){        
        while(doodlerBottom>59){
            doodlerBottom-=2
            doodlerLeft+=1
            newDoodler.doodVisual.style.bottom =`${doodlerBottom}px`     
            newDoodler.doodVisual.style.left = `${doodlerLeft}px` 
            thedoodlerBottom = doodlerBottom
            thedoodlerLeft = doodlerLeft
            await timer(10)  
        } 
    }
    load()
}
 
    