Challenge Concatenating Strings with the Plus Equals Operator has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
.
Please describe how to reproduce this issue, and include links to screenshots if possible.
The preview box states, "referenceError"... like okay?
My code:
// Example
var ourStr = "I come first. ";
ourStr += "I come second.";
// Only change code below this line
var myStr = "This is the first sentence. ";
ourStr += "This is the second sentence.";
update: the instruction was vague so I tried:
var myStr = "This is the first sentence. ";
myStr += "This is the second sentence.";
lol.
The reason for the error was that your code said outStr +=
instead of ourStr +=
, and outStr
is not defined.
We're working on clarifying this challenge in https://github.com/freeCodeCamp/freeCodeCamp/pull/13612
Before reporting an issue, please check whether this is really an issue with freeCodeCamp, and not your code, in the chatroom.
Will the updates in #13612 take away the confusion you had?
it is very clear Instructions
Build myStr over several lines by concatenating these two strings:
"This is the first sentence. " and "This is the second sentence." using the += operator.
it said myStr. Sorry challenge didnt asked you write ourStr.
I could understand this Instructions myself.
but we could change variables name. so it will be less misunderstand?
You don't need to change anything. I understand that some challenges need to be vague to encourage learner to do a little research. Part of problem-solving...
Thanks guys!
@texas2010 Keep in mind that it's easier to understand if you already know how it works. 馃檪 I can see how one may have gotten confused here, but I don't think we can do more to prevent it than what we're currently working on.
@systimotic no problem.