TypeError: "someAdjective" is read-only

Tell us what’s happening:
Describe your issue in detail here.
I like to think I coded right but results are:
// console output
TypeError: “someAdjective” is read-only

Your code so far

// Change code below this line
const someAdjective = "cool";
let myStr = "Learning to code is ";
someAdjective += myStr;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.72 Safari/537.36

Challenge: Appending Variables to Strings

Link to the challenge:

Read about const in js

the problem was the order:
someAdjective += myStr;
myStr += someAdjective;

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.