Sum All Odd Fibonacci Numbers while question

I’m trying to wrap my head how this while loop is working. Any input is apreaciated. Thank you

  **Your code so far**
function sumFibs(num) {
var currNum = 1
var prevNum = 1
var ab = currNum + prevNum
var sum =2
while(ab <= num){
 sum+=ab 
 currNum=prevNum
 prevNum=ab
 ab= currNum + prevNum
    
}
return sum
}

console.log(sumFibs(34));
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36

Challenge: Sum All Odd Fibonacci Numbers

Link to the challenge:

Watch it run.