search

Home  >  Q&A  >  body text

What does __.radio or __.ck mean? What grammar or language or framework? ?

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

習慣沉默習慣沉默2852 days ago574

reply all(2)I'll reply

  • 怪我咯

    怪我咯2017-05-19 10:30:10

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

    // 例如
    var ___ = {
        radio:function(){
            alert('radio')
        },
        ck:function(){
            alert('ck')
        }
    }
    
    //使用
    __.radio();
    __.ck()

    reply
    0
  • 怪我咯

    怪我咯2017-05-19 10:30:10

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

    reply
    0
  • Cancelreply