Naiya
1
Tell us what’s happening:
Your code so far
// Example
var myStr = "This is the first sentence. "
// Only change code below this line
myStr+= "This is the second sentence. "
console.log(myStr);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36
.
Challenge: Concatenating Strings with the Plus Equals Operator
Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/concatenating-strings-with-the-plus-equals-operator
Sky020
2
Welcome, Naiya.
You are not supposed to put a space after the full-stop.
Happy coding.
@Naiya
Solution:
// Example
var ourStr = "I come first. ";
ourStr += “I come second.”;
// Only change code below this line
var myStr = "This is the first sentence. ";
myStr += “This is the second sentence.”;
Naiya
5
// Example
var myStr = "This is the first sentence "
// Only change code below this line
myStr += "This is the second sentence "
console.log(myStr);
Sky020
6
Look very carefully at the question and what it is asking for. Every single letter, space, and full-stop has to be the same.