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
exportconstmain=asl.deploy.asStateMachine(async()=>{constarr=[1,2,3];letresult="";// use a for loop to append all numbers to a single stringfor(constitemofarr){switch(item){case1:
result=`${result}one`;break;case2:
result=`${result}two`;break;default:
result=`${result}three`;break;}}returnresult;});
exportconstmain=asl.deploy.asStateMachine(async()=>{constarr=[1,2,3];letresult="";// use a for loop to append all numbers to a single stringfor(constitemofarr){switch(item){case1:
case2:
result=`${result}not-three`;break;default:
result=`${result}three`;break;}}returnresult;});
exportconstmain=asl.deploy.asStateMachine(async()=>{constarr=[1,2,3];letresult="";// use a for loop to append all numbers to a single stringfor(constitemofarr){switch(item){case1:
result=`${result}1`;case2:
result=`${result}1or2`;default:
result=`${result}1or2or3`;}result=`${result}|`;}returnresult;});
exportconstmain=asl.deploy.asStateMachine(async()=>{constarr=[1,2,3];letresult="";// use a for loop to append all numbers to a single stringfor(constitemofarr){switch(item){case1:
result=`${result}one`;break;case2:
default:
result=`${result}not-one`;break;}}returnresult;});
exportconstmain=asl.deploy.asStateMachine(async()=>{constarr=[1,2,3];letresult="";// use a for loop to append all numbers to a single stringfor(constitemofarr){switch(item){default:
case1:
result=`${result}not-three`;break;case3:
result=`${result}three`;break;}}returnresult;});
exportconstmain=asl.deploy.asStateMachine(async()=>{constarr=[1,2,3];letresult="";// use a for loop to append all numbers to a single stringfor(constitemofarr){switch(item){default:
case1: {result=`${result}not-three`;console.log(result);break;}case3: {result=`${result}three`;console.log(result);break;}}}returnresult;});