hello guys..... i need a help about javascript

how to convert number (ex. 1) ----> to a word (ex, one)?

here it is.... ....if i will input a number like 20 it will then displayed a word twenty..
(the numerical 20 --------> become a word "twenty")

you would need to create a data dictionary.

``````var numbers = [];

numbers = 'zero';
numbers = 'one';
numbers = 'two';
numbers = 'three';
numbers = 'four';
...``````

Have fun with that.

There is no code to do the conversion. You could make an algorithm that could reduce a bit of the work, but you are kinda stuck my friend. You can try googling but I've never seen it before (beyond a hundred or so).

## All 9 Replies you would need to create a data dictionary.

``````var numbers = [];

numbers = 'zero';
numbers = 'one';
numbers = 'two';
numbers = 'three';
numbers = 'four';
...``````

Have fun with that.

you would need to create a data dictionary.

``````var numbers = [];

numbers = 'zero';
numbers = 'one';
numbers = 'two';
numbers = 'three';
numbers = 'four';
...``````

Have fun with that.

^^ thankz with that sir but what if i input 1,000,000 or above?
do i manually make a data dictionary up to million or beyond? or there is a code that do
all the conversion? There is no code to do the conversion. You could make an algorithm that could reduce a bit of the work, but you are kinda stuck my friend. You can try googling but I've never seen it before (beyond a hundred or so). uhmm.... can u teach me how to set up that in html?... have 1 button and 2 textbox (1 textbox is where u input a number then the 2nd is to display the result) thankzz so much^^

uhmm.... can u teach me how to set up that in html?... have 1 button and 2 textbox (1 textbox is where u input a number then the 2nd is to display the result) thankzz so much^^

Is that not exactly the same as the demo?

Airshow

Is that not exactly the same as the demo?

Airshow

i mean... just set up this in html...and send me the ready made of this coz im just starting javascript ^^

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.