program showing string concatenation?

Answers were Sorted based on User's Feedback



program showing string concatenation?..

Answer / rajeshwar

Hi,

I think the above answer will not work for java script as
per my knowledged.

$variable_name are used in php but not in javascript. To
acheive the requirement in java just remove $ symbols.

var a="hello";
var b="world";

var concat= a+b; alert(concat);

Is This Answer Correct ?    10 Yes 1 No

program showing string concatenation?..

Answer / prasadkonnur

HI Rajeshwar,

you are right. $variable work in php. not in javascript.

var a="hello";
var b="world";

var concat= a+b;
document.writeln(concat);

Is This Answer Correct ?    5 Yes 0 No

program showing string concatenation?..

Answer / vinoth180

var a="hello"
var b="JavaScript"
document.write(a+b);


Try this one...their is no need for the third for calculation

Is This Answer Correct ?    2 Yes 1 No

program showing string concatenation?..

Answer / prasadkonnur

var a="hello";
var b="world";

var concat= $a+$b;

Is This Answer Correct ?    4 Yes 7 No

Post New Answer

More JavaScript Interview Questions

Methods get and post in html forms - what's the difference?

0 Answers  


How many types of functions JavaScript supports?

0 Answers  


How can an HTMLCollection be traversed?

0 Answers  


What is innertext javascript?

0 Answers  


What is the output of 10+20+”30″ in JavaScript?

0 Answers  






Have you used any browser for debugging? If yes, how is it done?

0 Answers  


Are java and javascript same?

0 Answers  


Define closure.

0 Answers  


what is flux in javascript?

0 Answers  


What is the potential disadvantage of using a sticky session?

0 Answers  


What is javascript and how it works?

0 Answers  


Is client side front end?

0 Answers  


Categories