Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Write a JavaScript function which can take any number of
strings as arguments and outputs them as a single
concatenated string.

Answers were Sorted based on User's Feedback



Write a JavaScript function which can take any number of strings as arguments and outputs them as a..

Answer / ashok

<script type="text/javascript">
var a="i am ashok choudhary!";
var b="i belongs to jaipir.";
document.write(a+b);
</script>

Is This Answer Correct ?    0 Yes 0 No

Write a JavaScript function which can take any number of strings as arguments and outputs them as a..

Answer / szilveszter safar

function concatStrings () {
return Array.prototype.join.call(arguments, '');
}

Is This Answer Correct ?    0 Yes 0 No

Write a JavaScript function which can take any number of strings as arguments and outputs them as a..

Answer / madhav arora

Lets Declare two variables :"a" and "b" to solve this
problem :

var a = 'Hello world!';
var b = 'I am a JavaScript hacker.'
First of all, you can concatenate strings, sew them
together as it were:

document.write(a + b);
gives

Hello world!I am a JavaScript hacker

Is This Answer Correct ?    4 Yes 5 No

Write a JavaScript function which can take any number of strings as arguments and outputs them as a..

Answer / upendar

<script type="text/javascript">
var concatString= "";
function concatArgs() {
var argsLength = arguments.length;
for(var i=0; i<argsLength; i++) {
concatString = concatString + arguments[i];
}
}
document.write(concatString);
</script>

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More JavaScript Interview Questions

Which software is used for javascript?

0 Answers  


What are global variables in javascript?

0 Answers   UGC Corporation,


What is the difference between null and undefined?

1 Answers  


How to accessing elements using javascript?

0 Answers  


Hello , I am using following java script to open new window in I.E,but i am facing an issue the new window hangs often while opening,when you move mouse it opens normally.Can any body help me why this is happening as i am unable to understand this issue?please please if any one know so kindly help me I am in real difficulty through this issue.Thanks 'if(window.clipboardData){clipboardData.setData("Text","' + a.PatID + '");}' + 'ordwindow= window.open ("' + @OrderDetailURL + '", "RXOrderDetail", "location=0,status=0,menubar=0,toolba r=0,scrollbars=1,resizable=1"); ordwindow.moveTo(parent.screenLeft,0);var x; x=new ActiveXObject("WScript.Shell");x.SendKeys("% "); x.SendKeys ("x"); //fcttest((sp_RX_ChangeOrderStatus ' + '''' + a.DocID + '''' + ', 1, ' + convert(varchar,@SessionID) + '));' As [W],

0 Answers  


What is lazy loading java?

0 Answers  


If you need to hide the javascript code from the older browser versions, how will you perform it?

0 Answers  


What causes memory leaks?

0 Answers  


What is this in JavaScript?

1 Answers  


What is difference between local variable and global?

0 Answers  


How can you do a character count in javascript?

0 Answers  


How to count the number of element in an array using javascript?

0 Answers  


Categories