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

Advantages & Disadvavtages of Java Script? Advantages & Disadvantages of CGI Scripting? Structure of Java Script? Commands of Java Script? HTML Basic Reviews?

3 Answers  


Is there automatic type conversion in JavaScript?

0 Answers  


What is argument objects in javascript?

0 Answers  


How do you create a new object in JavaScript?

3 Answers   Satyam,


We are facing problem with the compatibilty of IE 7 and IE 6.We are calling a showModal window that is working fine in IE6 but with IE7 it opens a new Window and Data is not getting poputaled.In some pages it Gives an error "The webpage you are viewing is trying to Close the window.Do you want to close this window".

4 Answers   SAP Labs, TCS,


write a program to generte a harmonic series 1+1/2+1/3+1/4+1/5 upto 15 terms.

1 Answers  


program showing string concatenation?

4 Answers  


What is the syntax of ‘self invoking function’? Give an example?

0 Answers  


Explain javascript debounce function?

0 Answers  


What is use strict in javascript?

0 Answers  


What is primitive data types in javascript?

0 Answers  


What is the use of 'bind' method in JavaScript?

0 Answers  


Categories