0
Shorten the code
This is my solution to "convert us date to eu date" problem from code coach. I would appreciate any suggestions as to how to shorten the code. Thanks in advance! https://code.sololearn.com/cL4y2Q3pc60Z/?ref=app
3 Respostas
+ 1
Use split method.
If str.char(0) is a number then just split by /
And swap 0 and 1
Else split by space, find string equalent by array or switch cases. And split 2nd element by comma, remove spaces.
I did it in this way...
Took 20 lines code only....
+ 1
Vitaliy Reshetar wel come...
0
Jayakrishna, thank you!
It was very helpful!