Javascript homework help

Why is the value extracted from my ‘homebanking’ even if the value is bigger than the limit?
The function is extraerDinero()

Found It. Two nested IF’s without two ELSE’s.

2 Likes

Hi @augustolj and welcome to the community :wave:

I’m glad you could solve your problem. I think the last condition is wrong. Since you are now testing for the positive case, it should be saldoAExtraer % 100 === 0.
It’s also generally recommended to use “strict comparison” (===), because this also compares if the types of the values are the same. This could help noticing mistakes in your code.

Feel free to come back if you need more help. :slightly_smiling_face:

Have a nice day,
Michael

2 Likes