let result = "" for(let i = 1 ; i <= 50 ; i++){ switch(i){ case 1: result+= "0"+1+"_"; break; case 2: result+="0"+2+"_"; break; case 3: result+= "0"+3+"_"; break; case 4: result+= "0"+4+"_"; break; case 5: result+= "0"+5+"_"; break; case 6: result+= "0"+6+"_"; break; case 7: result+= "0"+7+"_"; break; case 8: result+= "0"+8+"_"; break; case 9: result+= "0"+9+"_"; break; default: result+=i+"_" } }