JavaScript Double Dollar Sign

后端 未结 5 2173
别那么骄傲
别那么骄傲 2020-11-29 06:54

I understand the use of the (single) dollar sign in popular JavaScript libraries such as jQuery and Prototype. I also understand the significance of the double dollar sign i

5条回答
  •  遥遥无期
    2020-11-29 07:38

    As far as I know, the dollar sign is just a regular character that can be used in variable names. It could be a convention to signify a property that shouldn't be messed around with.

    My guess is that the author used $$guid to avoid clashing with existing property names. He could probably have used __guid or something similar instead.

提交回复
热议问题