Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in Atom, You do not need to create a web page (.html) for this requirement.(Javascript) A) Write a function named getWords that accepts a sentence

in Atom, You do not need to create a web page (.html) for this requirement.(Javascript)

A) Write a function named getWords that accepts a sentence of words separated by one space, and returns an array of the words in the sentence. Review the String split method in our textbook and our class notes to see how this problem can be solved with a single line of code. Use arrow function syntax. Example:

> getWords('alpha bravo') > ['alpha', 'bravo'] B) Write a function named makeSentence that accepts an array of words, and returns a sentence made from the words. Review the Array join method in our class notes to see how this problem can be solved in one line of code. Use arrow function syntax. Examples:

> makeSentence(["When", "I", "was", "your", "age", "television", "was", "called", "books"]) > When I was your age television was called books"

> makeSentence(getWords('alpha bravo')) > "alpha bravo"

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

Excel 2024 In 7 Days

Authors: Alan Dinkins

1st Edition

B0CJ3X98XK, 979-8861224000

More Books

Students also viewed these Databases questions

Question

Describe the seven standard parts of a letter.

Answered: 1 week ago

Question

Explain how to develop effective Internet-based messages.

Answered: 1 week ago

Question

Identify the advantages and disadvantages of written messages.

Answered: 1 week ago