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

前端 未结 4 1763
情歌与酒
情歌与酒 2021-02-19 09:43

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:13

    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.

提交回复
热议问题