0 votes
in JavaScript by

What will be the output of the following Javascript code?

    var string1 = "Letsfindcourse";

    var intvalue = 30;

    alert( string1 + intvalue );

a) Letsfindcourse 30

b) 30

c) Letsfindcourse30

d) Exception

1 Answer

0 votes
by

Answer:-  C

Reason:In JavaScript the alert function does the type casting and converts the integer value to string. After that it concatenates both the strings and shows the result as a concatenated string. Thus Letsfindcourse30 would be correct.

Related questions

0 votes
asked Mar 23, 2021 in JavaScript by sharadyadav1986
0 votes
asked Oct 8, 2022 in JavaScript by rajeshsharma
...