Word Blanks
You are provided sentences with some missing words, like nouns, verbs, adjectives and adverbs. You then fill in the missing pieces with words of your choice in a way that the completed sentence makes sense.
Consider this sentence:
It was really ____, and we ____ ourselves ____.
This sentence has three missing pieces- an adjective, a verb and an adverb, and we can add words of our choice to complete it. We can then assign the completed sentence to a variable as follows:
const sentence = "It was really " + "hot" + ", and we " + "laughed" + " ourselves " + "silly" + ".";
In this challenge, we provide you with a noun, a verb, an adjective and an adverb. You need to form a complete sentence using words of your choice, along with the words we provide.
You will need to use the string concatenation operator + to build a new string, using the provided variables: myNoun, myAdjective, myVerb, and myAdverb. You will then assign the formed string to the wordBlanks variable. You should not change the words assigned to the variables.
You will also need to account for spaces in your string, so that the final sentence has spaces between all the words. The result should be a complete sentence.
Tests
- Waiting: 1.
wordBlanksshould be a string. - Waiting: 2. You should not change the values assigned to
myNoun,myVerb,myAdjectiveormyAdverb. - Waiting: 3. You should not directly use the values
dog,ran,big, orquicklyto createwordBlanks. - Waiting: 4.
wordBlanksshould contain all of the words assigned to the variablesmyNoun,myVerb,myAdjectiveandmyAdverbseparated by non-word characters (and any additional words of your choice).
/** * Your test output will go here */