4d600440-028f-4317-99a6-76331062d462
prompter
What is wrong with my code??????
64262d5f-2725-467b-b001-344253f19dc3
4d600440-028f-4317-99a6-76331062d462
assistant
Could you please provide me with the code, and if possible, also the error message, to better help me figure out what's wrong with your code.
832ae636-fe4b-425b-87d4-bbc9736682ed
64262d5f-2725-467b-b001-344253f19dc3
prompter
```javascript
document.addEventListener("DOMContentLoaded", function(event) {
    // get #in and #out textareas
    var inText = document.getElementById('in');
    var outText = document.getElementById('out');
    // when #in textarea is changed, update #out textarea
    inText.addEventListener('input', function() {
        outText = btoa(inText);
    });
    // when #out textarea is changed, update #in textarea
    outText.addEventListener('input', function() {
        inText = atob(outText);
    });
});
```
8fc887d1-c66d-43da-9de0-fef197dfbf49
832ae636-fe4b-425b-87d4-bbc9736682ed
assistant
It seems that you are trying to change the text value of the elements inText and outText, however you using the reference to the elements, instead of the reference to their text.
To solve it, replace the line in inText input event with:
```javascript
outText.value = btoa(inText.value);
```
and replace the line in outText input event with
```javascript
inText.value = atob(outText.value);
```