Discrepancy in lesson v. solution

Screen Shot 2022-07-07 at 7.42.22 AM

Lesson uses ‘let’, yet the solution uses ‘var’.

Are these not interchangable? My code was the exact same, but would not ‘solve’ because I had ‘let’ at the beginning. Please clarify!

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36

Challenge: Concatenating Strings with the Plus Equals Operator

Link to the challenge:

The discrepancy has been fixed.

That was quick, Randell. Thanks!

@RandellDawson I just took a look and it says let in both the lesson and the text editor. Just so my brain organizes this info correctly, it is supposed to be let and not var, correct?

var is still valid but let is newer and better than var, so stick with let when you know you may need to change the value of the variable later in your code.

Good deal. Thanks for clarifying! :raised_hands: