in JavaScript by
Which one of the following is correct output for the following javascriptcode:

var string1 = "Letsfindout";  

 var intvalue = 40;  

 alert( string1 + intvalue );  

a) Letsfindout 40

b) 40

c) Letsfindout40

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.

Related questions

+1 vote
asked Mar 22, 2021 in JavaScript by Robindeniel
0 votes
asked Mar 21, 2021 in JavaScript by rajeshsharma
0 votes
asked Mar 21, 2021 in JavaScript by rajeshsharma
...