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

What is a noscript tag?

0 Answers  


What is a closure and why are they so useful to us?

0 Answers  


What are the basic groups of dataypes in JavaScript?

0 Answers  


What are javascript functions?

0 Answers  


How to get height and width of different browser in Javascript?

0 Answers  






Is python better than javascript?

0 Answers  


what is pop()method in JavaScript?

0 Answers  


Explain arrow functions?

0 Answers  


How Can I get facebook fans/likes?

0 Answers  


What is the difference between undefined and object?

0 Answers  


how to run java script program

1 Answers  


How to submit a form using JavaScript by clicking a link?

0 Answers  


Categories