Tell us what’s happening:
Describe your issue in detail here.
Your code so far
// Change code below this line
const someAdjective = "awesome why not";
let myStr = "Learning to code is ";
mystr += someAdjective;
Your browser information:
User Agent is:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
Challenge: Appending Variables to Strings
Link to the challenge:
Hi @abizernalwala5253 !
Welcome to the forum!
Pay close attention to the error messages in the console.
You should be seeing this error message right now.
It is referring to this part here
You need to use camel casing for variable names like you did here
Once you fix that small error then the test will pass
Hello Dev, try to look at your code very well the mistake is there.
you’re trying to concatenate while not declaring a variable(mystr).
myStr is quite different from mystr.
to fix the problem youv’e to declare the third variable(let mystr) and you’re good to go.
Thankyou so much for help
someAdjective is a constant, change it to
let someAdjective = "awesome why not";
also you’re trying to change the value of myStr, instead do this
someAdjective += mystr;
someAdjective is a
const because the value is not ever getting reassigned. In fact, it is the proper usage of a
const for this very reason.
It’s also the default starter code which should never be changed unless the challenge explicitly asks you to change it.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.