说明以下函数是做什么用的;
补全空白处的代码
(function(window) {
function fn(str) {
this.str = str;
}
fn.prototype.format = function() {
var arg = ____;
return this.str.replace(____, function(a, b) {
return arg || '';
})
};
window.fn = fn;
})(window)
// use
var t = new fn('[1][2]');
console.log(t.format('http://Alibaba.com','alibaba','welcome'))
幕布斯7119047
暮色呼如