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;

In JAVASCRIPT write code in this function to concatenate the elements of

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!