You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constsplitNumber=num=>{constbase=`${Number(num)}`;const[integer,decimal]=base.split(".");letresult="";letcurrentNumber="";for(letindex=integer.length-1;index>=0;index--){constchar=integer[index];if(char&¤tNumber.length<3){console.log("currentNumber length < 3 should add to current number");currentNumber=`${char}${currentNumber}`;}if(currentNumber.length===3){result=`${index!==0 ? "," : ""}${currentNumber}${result}`;currentNumber="";console.log("currentNumber = 3 should add to result, after added result: ",result);}}if(decimal){result=`${result}.${decimal}`;}returnresult;};
No description provided.
The text was updated successfully, but these errors were encountered: