[removed] The Good Parts - How to not use `new` at all

前端 未结 9 1919
迷失自我
迷失自我 2020-12-07 09:15

Crockford\'s book, JavaScript: The Good Parts, says (on page 114) that constructor functions should always be given names with an initial capital letter (i

9条回答
  •  庸人自扰
    2020-12-07 09:29

    This question has already been asked and answered: Is JavaScript's "new" keyword considered harmful?

    As Raynos said, blindly following Crockford (or anyone else for that matter) without understanding why they say the things they do, is silly.

提交回复
热议问题