代码中的下划线_是什么意思呢?
生活随笔
收集整理的這篇文章主要介紹了
代码中的下划线_是什么意思呢?
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
在編程界中,下劃線_xx常常表示私有的意思,就像下方的代碼
/*** List of lifecycle hooks.*/_lifecycleHooks: ['init','created','beforeMount','mounted','beforeUpdate','updated','beforeDestroy','destroyed','activated','deactivated'],/*** Max circular updates allowed in a scheduler flush cycle.*/_maxUpdateCount: 100,/*** Server rendering?*/_isServer: process.env.VUE_ENV === 'server',_lifecycleHooks,_maxUpdateCount,_isServer都是私有的。
在python中,也是如此。
也可能它只是一個變量名
總結(jié)
以上是生活随笔為你收集整理的代码中的下划线_是什么意思呢?的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 使用Databricks作为分析平台
- 下一篇: 条款20:宁以pass-by-refer