What does the following statement do?
var mood = joy+happiness,
Select one
a sets variable mood to null
b. sets variable mood equal to happiness
c. adds happiness to joy and assigns to variable mood
d. sets variable mood equal to joy
Answers
Answered by
0
Answer:
Answer is b
I hope it helps you
Answered by
0
Option (D) is correct.
Adds happiness to joy and assigns to variable mood.
How to assign value to a variable?
- The = operator allows you to assign values to variables. On the left, a variable identification appears, and on the right, a value appears (of any value type). Assigning is done from right to left, thus var sum = 5 + 3; will give the variable sum the value of 8.
- The assignment operator, =, is used with either an expression or a constant to assign a value to a variable in the most frequent kind of statement in a program.
Similar questions