Tell us what’s happening:
Hi team!
I have tried this one multiple times. When I write “5” and click “convert” the animation works and it shows three numbers in the call stack.
Code:
const showAnimation = () => {
result.innerText = "Call Stack Animation";
animationData.forEach((obj) => {
setTimeout(() => {
animationContainer.innerHTML += `
<p id="${obj.inputVal}" class="animation-frame">${decimalToBinary(obj.inputVal)}</p>
`;
}, obj.addElDelay);
});
};
---- Thanks
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
<p id="${obj.inputVal}" class="animation-frame">${decimalToBinary(obj.inputVal)}</p>
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Challenge Information:
Learn Recursion by Building a Decimal to Binary Converter - Step 96