Run The Test Button not working

Run The Test Button not working
0

#1

my “run the test” Button is not working

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

what should I do?


#2

#3

First, you need to copy/paste your code into a reply to this thread, so we can see the code. Please do not post a screenshot of the code.

To 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.


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

// Only change code below this line

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

like that?


#5

Let’s look at the example code.

First, ourStr was declared with the string "I come first. ". Then, the string “I come second.” gets concatenated to the original ourStr and the re-assigned back to ourStr.

Remember, that writing the following:

ourStr += "I come second.";

is the equivalent to writing the following:

ourStr = ourStr + "I come second.";

In your solution, myStr is declared with the value “This it the first sentence”, so you do not need to reference this sentence again. Instead, you just need to use the += and reassign assign the concatenation of the myStr and the second sentence back to myStr like the example did for ourStr.


#7

You have two typos above.


#8

oh actually 2 typos!!! ugh