$.each([collection]) vs $([collection]).each()

前端 未结 2 1345
生来不讨喜
生来不讨喜 2021-02-14 09:54

Both methods appear to produce the same results, but I\'ve been hard-pressed to actually convince people that the second method works, since it\'s apparently not commonly known.

2条回答
  •  面向向阳花
    2021-02-14 10:33

    I'm not sure what everybody else says...but I almost exclusively use your second method there.

    Coming from .NET land...it just makes more sense to me and makes things easier to read.

提交回复
热议问题