Skip to content
字数
37 字
阅读时间
1 分钟
js
function createCache(){

    const data = {}

    return{

    set:function (a,b){

        data[a] = b

    },

    get:function (a){

        return data[a]

    }

}

}

const c = createCache()

c.set('name','xiaoming')

console.log(c.get('name'))

贡献者

The avatar of contributor named as sunchengzhi sunchengzhi

文件历史

撰写