玲儿灵

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

var str = "abcdefg";
String.prototype.constr = function(){
return this.split('').join('-');
}
str.constr();

答案:"a-b-c-d-e-f-g"

posted on 2014-12-23 14:43  玲儿灵  阅读(242)  评论(0编辑  收藏  举报