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

Does javascript support automatic type conversion?

759


How do I retrieve a cookie with a given name using a regular expression?

583


What is the difference between arrow function and normal function?

665


What is a closure javascript?

602


What are the different types of errors in javascript?

573






What is use of flutter?

572


What is the difference between attributes and property?

554


Is javascript a programming language?

541


What are math constants and functions using javascript?

572


Explain the working of timers in javascript?

558


What is arguments object in JavaScript?

634


Is jquery easier than javascript?

554


How to create an object using javascript?

606


Why is javascript good for websites?

573


what is a code in vb amount display in words

1431