Download presentation
Presentation is loading. Please wait.
1
The + can mean concatenate or add
The + can mean concatenate or add. If you want to add you must be using things that JavaScript recognizes as numbers. You can convert the contents of a field to a number using parseFloat if there are decimals and parseInt for a while number.
2
This is a nested if where I check myPoints < 10 and if that is true, I move Not.. to msg otherwise, I ask another question.
5
Right now if I enter an * I do multiplication, if I enter anything else I divide. To avoid this I need to add an if where I test for the / to divide. I am going to put an else on that if and move 0 to ans if anything other than * or / is entered.
8
is the same for these two examples.
12
I increment ct inside the loop
I increment ct inside the loop. This changes ct so eventually I will exit the loop. If the condition does not change, the loop will go on forever.
19
Wrapup where I do one time things when processing is complete.
27
complete.
29
I could have defined in the body.
34
With three questions that can be either Yes or No there are 8 possibilities.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.