js中toString和valueOf的区别

字符串运算优先toString();

 

数值运算优先valueOf();

 

都是js隐式调用。

posted @ 2020-03-31 22:03  Mock777  阅读(242)  评论(0编辑  收藏  举报