What does "1"+2+4 evaluate to?
Answers were Sorted based on User's Feedback
Answer / hk
Anything which follows string is converted to String.
Hence, "1" is string, and the digits 2 and 4 which comes
after this, also become part of string only.
So the answer is 124
| Is This Answer Correct ? | 70 Yes | 2 No |
Answer / hk & kmbkrishnan
Write a program in java and execute it with the following
code bellow:
System.out.println("1"+2+4);
And see the output.
Thanks & Regards
Hk and Kmbkrishnan
| Is This Answer Correct ? | 28 Yes | 4 No |
Answer / akash
it is 124 as it is ins tring format and after that what ever
b there is considered as string
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / shikha
answer is 124 as "1" in the starting is consider as a
string, therefore all other nos after that is consider as a
string unless brackets are not used.
| Is This Answer Correct ? | 7 Yes | 0 No |
How do you know if a set of points is a function?
What are the different types of errors available in javascript?
Javascript, Pass by Value or Pass by Reference?
Which built-in method returns the length of the string?
In a java script, what is the difference between "==" and "===" operator?
What are the two basic groups of dataypes in javascript?
write a program to generte a harmonic series 1+1/2+1/3+1/4+1/5 upto 15 terms.
What is called variable typing in javascript?
how to disable source option at view menu in browser like internet explorer...mozilla...etc..pls help me...
Why javascript is fast?
find the common prime divisors of two given numbers
How to open url in a new tab in javascript?