browserStore = function()
{
var self = {};
self.set = function(key, value)
{
console.log(`key:${key} value:${value}`)
}
self.get = function()
{
console.log(`return key value`)
}
return self;
}
var test = new browserStore();
test.set('key', 'value');
test.get('key', 'value');
browserStore.set('key', 'value'); // exception browserStore.set is not a function
browserStore.get(); // exception browserStore.set is not a function
0 comments:
댓글 쓰기