What does __.radio or __.ck mean? What grammar or language or framework? ?
習慣沉默
習慣沉默 2017-05-19 10:28:10
0
2
519

I saw this written in a piece of JavaScript, but I have never seen it before.
Does anyone know?

習慣沉默
習慣沉默

reply all(2)
刘奇

js allows the use of _ 还有 $这类特殊字符命名的。
所以,看到这类不要惊慌。underscore.js 和 lodash.js names in this style.

// 例如
var ___ = {
    radio:function(){
        alert('radio')
    },
    ck:function(){
        alert('ck')
    }
}

//使用
__.radio();
__.ck()
刘奇

Javascript tool libraries such as underscore or lodash~, you can take a look at the source code, it is relatively easy to understand

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template