Tell us what’s happening:
Describe your issue in detail here.
This lesson has me stumped. Any help would be appreciated.
Your code so far
const myStr = var myStr = "This is the start." + "This is the start.";
Your browser information:
User Agent is:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/184.108.40.206 Safari/537.36
Challenge: Concatenating Strings with Plus Operator
Link to the challenge:
I don’t understand what they want me to do.
why have you put 2 declarations
const myString and
var myString on the same line?
let. but not together.
I’ve seen this a lot actually when I was having trouble with it. When concatenating strings, think of it as if you were actually writing sentences, spaces would be needed between complete sentences.
Hope that helps!
It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.
We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.
I will keep that in mind, I edited my response and hope to help.
I need to clarify my question
The answer to this is var myStr = “This is the start.” + “This is the start.”;
I know that is the answer. The problem is that on my page it opens up with constr myStr=“” and asking me to fill in between the quotes.
I have tried deleting the first line I have tried filling in the quotations, but nothing will let me pass. But I know the answer is what I have written above but where do I put it? And why does it start with the other constr?
No, you should not be using
var. Just use the
const that the code started with. I assume you looked at the Hint section and saw
var there. One of the tests even tells you to use
myStr should not be
This is the start. This is the start. Instead, it should be
This is the start. This is the end.
const myStr = “This is the start.” + “This is the end.”; // Change this line
This won’t work either.
I would really like to solve this and move on to the next challenge.
Mod Edit: SOLUTION REDACTED
Thanks. I used the var it worked. However, the const is the right variable to use.
“Be sure to include a space between the two strings.” I would say double check your strings to make sure you are including spaces within the quotation marks. Hope that helps.
I have closed this because it’s duplicate of this Need help with this step - #7 by Sboonny