为何JavaScript变量会以美圆符号开头? - Why would a JavaScript variable start with a dollar sign?

问题:

I quite often see JavaScript with variables that start with a dollar sign. 我常常看到JavaScript带有以美圆符号开头的变量。 When/why would you choose to prefix a variable in this way? 您什么时候/为何选择以这种方式为变量添加前缀? ui

(I'm not asking about $('p.foo') syntax that you see in jQuery and others, but normal variables like $name and $order ) (我不是在问您在jQuery和其余语言中看到的$('p.foo')语法,而是普通变量,例如$name$order this


解决方案:

参考一: https://stackoom.com/question/rYD/为何JavaScript变量会以美圆符号开头
参考二: https://oldbug.net/q/rYD/Why-would-a-JavaScript-variable-start-with-a-dollar-sign
相关文章
相关标签/搜索