What will be the output of the following JavaScript code? [code] string a = ”hi”; string b =”there”; alert(a+b); [/code]

What will be the output of the following JavaScript code?
Code:
string  a = ”hi”;
string  b =”there”;
alert(a+b);
A. hi
B. there
C. hithere
D. undefined
 
Answer: c
Explanation: alert function is used to print the value passed as argument in a dialog box in a browser. The alert function adds both the string and prints the result as a combined string.
 

Tìm kiếm

Back
Top