• 请不要在回答技术问题时复制粘贴 AI 生成的内容
chenyu0532
V2EX  ›  程序员

for if 的嵌套

  •  
  •   chenyu0532 · May 31, 2018 · 2608 views
    This topic created in 2974 days ago, the information mentioned may be changed or developed.

    正在写 ts 请问下 for 和 if 嵌套的话。。最多有多少个 for 和 if 是比较合理的。。有没有个共识。。 多于几层就说明写的代码不合理了。。

    1 replies    2018-05-31 13:00:20 +08:00
    ai277014717
        1
    ai277014717  
       May 31, 2018
    我们写 iOS 一行限制 120 个字符。超了的时候考虑不继续嵌套写成函数。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3098 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 14:29 · PVG 22:29 · LAX 07:29 · JFK 10:29
    ♥ Do have faith in what you're doing.