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
How can you get the total number of arguments passed to a function?
How to remove duplicate values from a javascript array?
What are javascript objects?
What is the use of window object?
What is argument objects in javascript & how to get the type of arguments passed to a function?
Difference between the substr() and substring() in JavaScript?
What is jscript used for?
How to add new elements dynamically?
What is === in javascript?
What is npm repository?
What is asynchronous javascript?
Explain equality operators in javascript?
What is Number object in JavaScript?
Do you need to declare variables in javascript?
What are the predefined functions in javascript?