Tell us what’s happening:
doesnt seem to be working i have tried alot of times,
it keeps saying that i have not added two settimeout() functions
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
animationData.forEach((obj) => {
setTimeout(() => {
}, obj.addElDelay);
setTimeout(() => {
}, obj.showMsgDelay);
});
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 OPR/119.0.0.0
Challenge Information:
Learn Recursion by Building a Decimal to Binary Converter - Step 102
You have changed the given code. Please reset this step and try again.
sorry about that i didnt know i completed it because i wasnt able to proceed and i still am not able to submit it and move on
Please post your full updated code - not a screenshot.
setTimeout(() => {
}, obj.addElDelay);
setTimeout(() => {
}, obj.showMsgDelay);
Would you show the entire showAnimation
function please? It appears you have added code for the first setTimeout()
that was already included in the given code.
ILM
June 5, 2025, 5:28pm
9
sorry, I mistakenly thought it wasn’t your topic, I should not have removed your code
1 Like
function showAnimation() {
animationData.forEach((obj) => {
setTimeout(() => {
}, obj.addElDelay);
setTimeout(() => {
}, obj.showMsgDelay);
});
that is the code i currently have
But this was the given code, and you were asked only to add code for the last setTimeout()
you have there, so please reset and try again.
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);
bro i dont understand i did what u said in the previous step the 2 settimeout and now im trying this still nothing
setTimeout(() => {
}, obj.showMsgDelay);
});
I assume you have reset the step and that’s the only code you have added. If so, scroll down past where you entered your code. You should see red squiggly lines under });
because that code was already included for you. Remove that from your code and you should be able to continue.
yes thank you it proceeded to work