var str = "abcdefg";
String.prototype.constr = function(){
return this.split('').join('-');
}
str.constr();
答案:"a-b-c-d-e-f-g"
var str = "abcdefg";
String.prototype.constr = function(){
return this.split('').join('-');
}
str.constr();
答案:"a-b-c-d-e-f-g"