If the difference is less than or equal to the available chances then pick all numbers
let sum = 0 ; for ( let i = start ; i < arr . length ; i ++ ) { sum = sum + arr [ i ] ; } return sum ; } let psa = 0 ; let sum = 0 ; for ( let i = start ; i < arr . length ; i ++ ) { sum = sum + arr [ i ] ; }