Computer Science, asked by anshuangupta4818, 10 months ago

What will be the value of res in the following expression? var res = ""70"" + 25 (i) 95 (ii) 7025 (iii) 25 (iv) No output due to error.

Answers

Answered by aniketsiddarthk
0

Answer:

Hey mate here is your answer........................

Explanation:

iii option 25 is the answer for the question what will be the value of res in the following expression? var res= ""70"" +25. The answer is 25..

Answered by shilpa85475
1

Answer:  

The value of res in the given expression var res ="70" is Option B: 7025

EXPLANATION:  

The concatenation operator concatenates two string operands. It prioritizes string operands over numeric operands and works from left to right. The results would depend on the order of the operations that are performed. In the given expression it will concatenate 70 and 25 as 70 is inside quotes. It will not add the two numbers. It will also not give any error or discard 70. I will concatenate. Hence, correct answer is Option B.

Similar questions