78.0k views
5 votes
What is the value of the variable named myNum after the statements that follow are executed? var myNum = 14; var yourNum = 4; myNum++; yourNum-- myNum = myNum * yourNum;

1 Answer

4 votes

Answer:

45

Step-by-step explanation:

Initially, myNum is equal to 14 and yourNum is equal to 4

Then, myNum is incremented by 1 and becomes 15

Also, yourNum is decremented by 1 and becomes 3

Finally, myNum is set to myNum x yourNum, 15 x 3 = 45

User Naren
by
5.6k points