Javascript Variables

Hello guys , here there are two errors which I can’t find out ? Can anyone help me out with this? such that:
The results panel should be outputting the name Chris , and a statement about how old Chris will be in 20 years’ time. How can you fix the problem and correct the output?


// Add your code here

const myName = 'Default';
myName = 'Chris';

let myAge = '42';

// Don't edit the code below here!

section.innerHTML = ' ';
const para1 = document.createElement('p');
const para2 = document.createElement('p');
para1.textContent = myName;
para2.textContent = `In 20 years, I will be ${myAge + 20}`;
section.appendChild(para1);
section.appendChild(para2);
    ```

Later in the code, there is an expression: myAge + 20.
So, myAge should be a number, not a string.

2 Likes