javascript - What is the difference between js's toString method and toLocaleString()
phpcn_u1582
phpcn_u1582 2017-06-30 09:54:05
0
2
846
  1. toString() in the js document is used to convert it into a string

  2. toLocaleString() is used to convert to a local string

  3. My code tests are all used to convert them into strings. What is the connection and difference between the two?

I can’t see any difference through the following two pieces of code

phpcn_u1582
phpcn_u1582

reply all(2)
伊谢尔伦

First take a look at MDN and then you can refer to both
https://developer.mozilla.org...

https://developer.mozilla.org...

The description of toLocaleString looks like this

  • Object's toLocaleString returns the result of calling toString(). *

習慣沉默

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template