I’m confused as to how decimalToBinary(5) makes 10, since 5 / 2 is 2.5.
This is the step where we put
“decimalToBinary(5) returns ‘10’ + 1 (5 % 2). Then it pops off the stack.”
Your code so far
<!-- file: index.html -->
/* file: script.js */
// User Editable Region
{
inputVal: 5,
addElDelay: 1000
},
// User Editable Region
/* file: styles.css */
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3 Safari/605.1.15
Challenge Information:
Learn Recursion by Building a Decimal to Binary Converter - Step 101