Concatenating Strings with the Plus Equals Operator problem

Concatenating Strings with the Plus Equals Operator problem
0

#1

Tell us what’s happening:

what farther things I need to do with this script.

Your code so far


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

// Only change code below this line

var myStr="This is the first sentence. " += "This is the second sentence.";



Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/concatenating-strings-with-the-plus-equals-operator


#2

The += operator cannot be used like what you’ve done.

var myStr="This is the first sentence. " += "This is the second sentence.";
//This is wrong

var myStr="This is the first sentence. " + "This is the second sentence.";
//This is correct but will not pass the test.

You’ll have to use the += operator to pass the test.

var ourStr = "I come first. ";
ourStr += "I come second.";
//Carefully observe this example and try again.