Ngouend raoul Gerard• 500
@BeinRain06
Posted
Great Dolly you added regex function in your javascript code, good work, keep going on.
To fix this bug NaN :
Try to add this line code in :
else if (buttons[I] === equalBtn) {
firstNumber = initialNumber[0];
//**add**
if (isNaN(firstNumber)) {
return counter;// initially counter=0
}
counter += firstNumber ;
...
}
You can go ahead and Try it to see if it's working to put the result to zero.
Have a happy coding Dolly
0