爲何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
相關文章
相關標籤/搜索