String Concatenation

Hi All,

I am brand new to coding. I need to create this output

Blowing from the west
Fallen leaves gather
In the east.

using concatenate. I am stuck. Kindly help!!

I have used this code:

var haiku = "Blowing from the West \n Fallen leaves gather \n In the East";
console.log(haiku);

They are not accepting it.

It may be that you have an extra space at the end of the lines and one extra space at the beginning (\n), before and after the “to new line” character

If you post where the exercise is, or what is exactly the challenge description or the failing tests it may be easier to point out what the issue is, right now I am just making hypothesis… considering that you titled this "String concatenation " wouldn’t you need to create separate strings to concat together?

1 Like

Thanks for your reply. I am truly grateful for your support.

https://classroom.udacity.com/courses/ud803-india/lessons/74007e2e-2a0a-4de3-a8a6-5c2ec4275773/concepts/69fa04db-4a01-443b-89f5-e60626379ef9

Directions:

Build a string using concatenation by combining the lines from this famous haiku poem by Yosa Buson.

Blowing from the west
Fallen leaves gather
In the east.

Each string should be printed on its own line.

Hint: You will need to use special characters to produce the following output. For a refresher, feel free to review the previous Escaping Strings lesson in this course.

I can’t access it - so, as it asks you to use concatenation, do you know how to concatenate strings? what you can use for that?