Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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;

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

What is project portfolio management?

Answered: 1 week ago

Question

Understand the role of corporate design in communications.

Answered: 1 week ago

Question

What is DDL?

Answered: 1 week ago