javascript单词
Lots of programming involves calculations with numbers, and you can easily format numbers for display by adding commas, decimals, negative signs, and other appropriate characters depending on the kind of number it is.
许多编程都涉及到使用数字进行计算,并且您可以根据数字的种类,通过添加逗号,小数,负号和其他适当的字符来轻松格式化数字以进行显示。
But you're not always presenting your results as part of a mathematical equation. The Web for the general user is more about words than it is about numbers, so sometimes a number displayed as a number isn't appropriate.
但是,您并不总是将结果表示为数学方程式的一部分。 对于普通用户而言,Web更多地是关于单词而不是数字,因此有时将数字显示为数字是不合适的。
In this case, you need the equivalent of the number in words, not in numerals. This is where you can run into difficulties. How do you convert the numeric results of your calculations when you need the number displayed in words?
在这种情况下,您需要等价于单词而不是数字。 这是您遇到困难的地方。 当需要用字显示的数字时,如何转换计算的数字结果?
Converting a number int