I don't like this… Is this cheating the language?

前端 未结 15 2640
一向
一向 2021-02-13 15:52

I have seen something like the following a couple times... and I hate it. Is this basically \'cheating\' the language? Or.. would you consider this to be \'ok\' because the IsNu

15条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-13 16:16

    This is valid code, in my opinion (although declaring a variable and assigning it on the next line is pretty annoying), but you should probably realize that you can enter the else-block also in the condition where the length of the string is < 3.

提交回复
热议问题