0 votes
in JavaScript by
See the given code of JavaScript and choose the correct output from the following:

var string1 = "40";  

varvalueinit=50;  

alert( string1 +intvalue);  

a) 4090

b) 90

c) 4050

d) Exception

1 Answer

0 votes
by

Answer: C

Reason: In JavaScript, the alert method does the typecasting and converts the value of the variable "valueinit" to a string after that it concatenates both of the strings and displayed them on the screen. So, here the correct output would be 4050.

Related questions

0 votes
asked Mar 23, 2021 in JavaScript by sharadyadav1986
+1 vote
asked Mar 22, 2021 in JavaScript by Robindeniel
...