I am currently learning a bit. In one script I get a number which lenghts usually is 4. In rare cases it can be a 8 digit number. If it's 8 digits long I need to save it in a different variable.
So I get my variable, lets call it mynumber
.
Now I printed mynumber.length
which is mostly 4. If it is greater than 4 I want to store my original variable in mynumber2
and delete it from mynumber
.
What's a good way to achive that?