Building a Decimal to Binary Converter- step 103 question

So I have a simple question regarding step 103 -Learn Recursion by Building a Decimal to Binary Converter.

My question is why do we not use quotes within the .getElementById() section on this step? I thought we always provided a string for use within .getElementById()?

here is a link to the step in question: Learn Recursion by Building a Decimal to Binary Converter: Step 103 | freeCodeCamp.org

because you don’t have an id that is literally obj.inputVal, instead the id is the value contained at obj.inputVal

it’s the difference between a string and a variable, or in this case an object property

1 Like