ITPub博客

首页 > 应用开发 > > 请问JavaScript字符串里的+号是什么意思

请问JavaScript字符串里的+号是什么意思

作者:deepocean601 时间:2019-08-28 14:00:08 0 删除 编辑

return '(' + this.x + ', ' + this.y + ')';

完整代码是function Point(x, y) {

this.x = x;

this.y = y;

}

Point.prototype.toString = function () {

return '(' + this.x + ', ' + this.y + ')';

};

var p = new Point(1, 2);

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2557/viewspace-3129069/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: c++分主题
请登录后发表评论 登录
全部评论

注册时间:2019-08-16

  • 博文量
    102
  • 访问量
    475