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

How can you get the total number of arguments passed to a function?

1032


How to remove duplicate values from a javascript array?

941


What are javascript objects?

931


What is the use of window object?

934


What is argument objects in javascript & how to get the type of arguments passed to a function?

990


Difference between the substr() and substring() in JavaScript?

997


What is jscript used for?

883


How to add new elements dynamically?

938


What is === in javascript?

972


What is npm repository?

885


What is asynchronous javascript?

891


Explain equality operators in javascript?

923


What is Number object in JavaScript?

1016


Do you need to declare variables in javascript?

873


What are the predefined functions in javascript?

966