Is this snippet of code always gonna print the statement of the else block

let bank_balance = 500;
let price = 120.36;
let accesories_price = 65.50;
let tax_rate = 0.08;
let spending_threshold = 300;
let ammount = 0;

function add_tax(ammount){
    return ammount += ammount * tax_rate;
}

function formatting(ammount){
    return `$${ammount.toFixed(2)}`;
}

while(ammount < bank_balance){
    // buy a phone !!
    ammount += price;
    if(ammount < spending_threshold){
        ammount += accesories_price;
    }
}

if(add_tax(ammount) < bank_balance) 
    console.log(`Your purchase: ${formatting(add_tax(ammount))}`);
else
    console.log('Sorry! you cant afford');



I think it might be very usseful for you to use the tool bellow:
http://pythontutor.com/javascript.html#mode=display

Also the answer is simply no it returns the else statment because, certain conditions are compared into your code and as it runs through it.

See for example this line
< means lesser then

while(ammount < bank_balance)

it compares the ammount to the bank balance

I know about the conditional statement but I think this code is never gonna execute anything without “Sorry! You cant afford” because i think there is some slight mistake in the logic