Concatenating Strings with Plus Operator-What is the problem with this code,while in tutorial videos are perfect?

Concatenating Strings with Plus Operator-What is the problem with this code,while in tutorial videos are perfect?
0

#1

Tell us what’s happening:

Your code so far

// Example
var ourStr = "I come first. " + "I come second.";

// Only change code below this line

var myStr ="This is the start." + "This is the end.";


Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299.

Link to the challenge:


#2

your output doesn’t have a space after This is the start.


#3

It did not help,but thanks for trying.


#4

Notice the space after the full stop in "This is the start. ".
If you don’t put this space then your output will look like this This is the start.This is the end.,whereas the expected output is This is the start. This is the end.


#5

If you are still can not pass the test after both of @sonimadhuri’s suggestions, then post your latest code into a reply.

When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.


#6

// Example
var ourStr = "I come first. " + “I come second.”;

// Only change code below this line

var myStr;

var myStr = “This is the start.” + “This is the end.”;


#7

@sonimadhuri already told you the exact problem. You need a space between the first sentence and the second sentence. You are missing a space in the first string specified in the instructions.

The first string in the instructions is:

"This is the start. "

and you wrote:

“This is the start.”

The instructions string has a space after the period. Your first string does not.


#8

It still does not allow me to proceed,thoug I did,what you wrote.


#9

Sorry,I realized,it was necessary only at first sentence.

Thanks guys!


#10

Make sure you use straight quotes " and not curly quotes “ or ” in your solution.

EDIT: Looks like you figured it out as I was typing this message.