toLocaleString() method returns a string value version of the current number, whose format may vary based on the browser's local settings.
You can try running the following code to return the string value version -
<html> <head> <title>JavaScript toLocaleString() Method </title> </head> <body> <script> var num = new Number(150.1234); document.write( num.toLocaleString()); </script> </body> </html>
The above is the detailed content of How can I return the current number as a string value version?. For more information, please follow other related articles on the PHP Chinese website!