Question: In JAVASCRIPT write code in this function to concatenate the elements of an array (parameter) into a string, and return the new string. Put a
In JAVASCRIPT
write code in this function to concatenate the elements of an array (parameter) into a string, and return the new string.
Put a space between each element (string) in the return string. The sentence should start with a capital letter and end with a full stop.
arrToProccess is the array that's passed in.
function makeString(arrToProcess) {
//write the code In this function
//return the processed array as a string with the variable strReturn
return strReturn;
}
Should pass this test;

QUnit.test('Test makeString function', function( assert ) { let arrTest1 = ["hello", "world", "from", "APP"]; let strResult1 = "Hello world from APP."; let arrTest2 = ["it","is", "a", "wonderful","day"]; let strResult2 = "It is a wonderful day."; assert.equal(makeString(arrTest1), strResult1, "Make string function testi worked"); assert.equal(makeString(arrTest2), strResult2, "Make string function test2 worked"); })
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
