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

**URL:** <https://forum.freecodecamp.org/t/learn-recursion-by-building-a-decimal-to-binary-converter-step-105/673876>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [February 20, 2024, 7:10pm UTC](https://forum.freecodecamp.org/t/learn-recursion-by-building-a-decimal-to-binary-converter-step-105/673876 "2024-02-20T19:10:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jdamour1](https://avatars.discourse-cdn.com/v4/letter/j/ce73a5/32.png) [@Jdamour1](https://forum.freecodecamp.org/u/Jdamour1)\
**Post date:** [February 20, 2024, 7:10pm UTC](https://forum.freecodecamp.org/t/learn-recursion-by-building-a-decimal-to-binary-converter-step-105/673876/1 "2024-02-20T19:10:32Z")

</div>

### Tell us what’s happening: You should chain `.textContent` to the `.getElementById()` method.

### Your code so far

setTimeout(() =\> {  
document.getElementById(obj.msg).textContent;

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

````plaintext
Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

````

### Your browser information:

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

### Challenge Information:

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

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-recursion-by-building-a-decimal-to-binary-converter/step-105)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [February 21, 2024, 10:01am UTC](https://forum.freecodecamp.org/t/learn-recursion-by-building-a-decimal-to-binary-converter-step-105/673876/2 "2024-02-21T10:01:23Z")

</div>

> [@Jdamour1](#):
>
> g).textContent;

you need to assign something to this, it’s not enough to select the `textContent` property, you also need to change it

---

<div class="post-metadata">

**Author:** ![Danishhafeez](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@Danishhafeez](https://forum.freecodecamp.org/u/Danishhafeez)\
**Post date:** [February 21, 2024, 10:53am UTC](https://forum.freecodecamp.org/t/learn-recursion-by-building-a-decimal-to-binary-converter-step-105/673876/3 "2024-02-21T10:53:41Z")

</div>

setTimeout(() =\> {  
var textContent = document.getElementById(obj.msg).textContent;  
// Now you can use the text content stored in the variable ‘textContent’  
console.log(textContent); // Or do something else with it  
}, 1000); // Delay the execution for 1000 milliseconds (1 second)

In this example, the `textContent` variable stores the text content of the element with the ID specified by `obj.msg` . You can then use this variable to perform further operations, such as logging it to the console or manipulating the DOM.

---

<div class="post-metadata">

**Author:** ![Jdamour1](https://avatars.discourse-cdn.com/v4/letter/j/ce73a5/32.png) [@Jdamour1](https://forum.freecodecamp.org/u/Jdamour1)\
**Post date:** [February 22, 2024, 3:51pm UTC](https://forum.freecodecamp.org/t/learn-recursion-by-building-a-decimal-to-binary-converter-step-105/673876/4 "2024-02-22T15:51:23Z")

</div>

I am not understanding it well, please try to go deep

---

<div class="post-metadata">

**Author:** ![Jdamour1](https://avatars.discourse-cdn.com/v4/letter/j/ce73a5/32.png) [@Jdamour1](https://forum.freecodecamp.org/u/Jdamour1)\
**Post date:** [February 22, 2024, 4:05pm UTC](https://forum.freecodecamp.org/t/learn-recursion-by-building-a-decimal-to-binary-converter-step-105/673876/5 "2024-02-22T16:05:40Z")

</div>

Nothing is changing. I am trying but it is not working

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [February 23, 2024, 8:14am UTC](https://forum.freecodecamp.org/t/learn-recursion-by-building-a-decimal-to-binary-converter-step-105/673876/6 "2024-02-23T08:14:02Z")

</div>

can you show your new code please?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [August 23, 2024, 8:14pm UTC](https://forum.freecodecamp.org/t/learn-recursion-by-building-a-decimal-to-binary-converter-step-105/673876/7 "2024-08-23T20:14:43Z")

</div>

Closed on August 23, 2024, 8:14pm UTC

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