Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

对象转基本类型是不是有问题? #167

Open
lwxk opened this issue Nov 25, 2018 · 0 comments
Open

对象转基本类型是不是有问题? #167

lwxk opened this issue Nov 25, 2018 · 0 comments

Comments

@lwxk
Copy link

lwxk commented Nov 25, 2018

文中描述对象转基本类型是首先会调用 valueOf 然后调用 toString。
转换成数字是这个顺序,转换成字符串时先调用toString,后调用valueOf方法。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant