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.

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between arrow function and normal function?

843


Which built-in method returns the calling string value converted to lower case?

1119


How Does Function Hoisting Work in JavaScript?

874


How do you check if an object is an array or not?

922


Basic methods for opening a popup window using javascript?

916


Explain the for-in loop?

861


Where is javascript used most?

872


Describe negative infinity in javascript?

938


What would be the result of 2+5+”3″?

883


What is let keyword in typescript?

949


What is output of undefined * 2 in javascript?

887


How do you change the style/class on any element using javascript?

876


What does the following statement declares?

919


What are .js files?

851


List some unit testing frameworks javascript

891