Question: 3 . makeSentence function b ) Write a function named makeSentence that accepts an array of words, and returns a sentence ( i . e

3. makeSentence function
b) Write a function named makeSentence that accepts an array of words, and returns a sentence (i.e. a string) made from the words.
b) Run the test shown below in the console to verify your function works properly.
// Tests
2
console.log(makeSentence(["When", "I", "was", "your", "age", "television", "was", "called", "books"]));
// expect "When I was your age television was called books "
c) Add code in your JavaScript file to call the makeSentence function with an argument of ["When", "I", "was", "your", "age", "television", "was", "called", "books"] and displays what it returns in the textarea of the web page by concatenating to the textarea value.

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 Programming Questions!