Better to use “and” or “in” when chaining “let” statements?

前端 未结 4 1334
耶瑟儿~
耶瑟儿~ 2021-02-19 09:57

I realize this is probably a silly question, but...

If I\'m chaining a bunch of let statements which do not need to know each other\'s values, is it

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-19 10:19

    I would say in is better because it reduces scope and better expresses intent. If I see all these defintions chained together in a shared scope manner I would be under the impression that it was done for a reason and would be looking for how they effect each other.

提交回复
热议问题