Learn Recursion by Building a Decimal to Binary Converter - Step 105

Tell us what’s happening:

Using the .getElementById() method, set the textContent property of the targeted element equal to the msg property of the current object.
You should set the textContent property of the targeted element equal to the msg property of the current object.

Your code so far

const targetElement = document.getElementById(obj.inputVal).textContent;
  obj.msg = targetElement;

Challenge Information:

Learn Recursion by Building a Decimal to Binary Converter - Step 105

1 Like

I would suggest resetting the lesson.

You already have this element here

document.getElementById(obj.inputVal)

you need to set the textContent for that element. And the value you need to set would be the msg property of the current object.

hope that helps

2 Likes

it looks like you were close here

you just need to assign the msg to it to pass

5 Likes

ohhh, now i got it! Thanks,nice tip :+1: