I am not understanding what I’m doing wrong on this challenge. I eventually got the right answer but I would just like someone to explain to me why what I put the first time isn’t working.
This is the challenge:
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:
myAdverb. You will then assign the formed string to the
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.
I am putting
var result = "The " + myNoun + "took a " + myAdjective + "piece of that and " + myAdverb + " " + myVerb;
and it won’t accept it
but this it accepts:
var result = "My " + myNoun + " Charlie is really " + myAdjective + " and it " + myVerb + " really " + myAdverb;
Can someone please explain this to me? Why is the top wrong but the bottom right? It doesn’t make sense to me at all