Which one of the following codes is correct for concatenating the strings passed into the function?
A. Code 1
functionconcatenate()
{
returnString.prototype.concat('', arguments);
}
B. Code 2
functionconcatenate()
{
returnString.prototype.concat.apply('', arguments);
}
C. Code 3
functionconcatenate()
{
returnString.prototype.apply('', arguments);
}
D. Code 4
functionconcatenate()
{
returnString.concat.apply('', arguments);
}