I’ve followed the rules for the below challenge and I still can’t seem to pass the test. I’m concatenating strings using the + operator. Both phrases are correct but I still get an error code. Any ideas?
Your code so far
const myStr= "This is the start." + "This is the end."; // Change this line
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Safari/605.1.15
Challenge: Concatenating Strings with Plus Operator
Hi @bbsmooth, I’ve put a space between the two strings and I’m still getting the error;
myStr should have a value of the string
This is the start. This is the end.
I’ve followed how the string should be completed in the video hint and how they have done it so I’m a bit puzzled.
When your code is not working it is best to use console.log to see the issue. I have added two here to represent the correct output and your output.
const myStr= "This is the start." + "This is the end."; // Change this line
//correct answer
console.log('This is the start. This is the end.')
//your answer
console.log(myStr)