Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > how to convert integer to string in javascript

Reply
Thread Tools

how to convert integer to string in javascript

 
 
TomislaW
Guest
Posts: n/a
 
      03-24-2005
i have number that i need to concatenate with string


 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      03-24-2005
TomislaW wrote on 24 mrt 2005 in comp.lang.javascript:
> i have number that i need to concatenate with string


result = 7 + " dwarfs of Snowwhite."

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

 
Reply With Quote
 
 
 
 
TomislaW
Guest
Posts: n/a
 
      03-24-2005
"Evertjan." <> wrote in message
news:Xns9623A2C94B347eejj99@194.109.133.29...
> TomislaW wrote on 24 mrt 2005 in comp.lang.javascript:
>> i have number that i need to concatenate with string

>
> result = 7 + " dwarfs of Snowwhite."


this does not work with firefox(mozilla)


 
Reply With Quote
 
Lee
Guest
Posts: n/a
 
      03-24-2005
TomislaW said:
>
>"Evertjan." <> wrote in message
>news:Xns9623A2C94B347eejj99@194.109.133.29...
>> TomislaW wrote on 24 mrt 2005 in comp.lang.javascript:
>>> i have number that i need to concatenate with string

>>
>> result = 7 + " dwarfs of Snowwhite."

>
>this does not work with firefox(mozilla)


Sure it does. Show us exactly what "does not work".

 
Reply With Quote
 
Chris Sharman
Guest
Posts: n/a
 
      03-24-2005
TomislaW wrote:

> "Evertjan." <> wrote in message
> news:Xns9623A2C94B347eejj99@194.109.133.29...
>
>>TomislaW wrote on 24 mrt 2005 in comp.lang.javascript:
>>
>>>i have number that i need to concatenate with string

>>
>>result = 7 + " dwarfs of Snowwhite."

>
>
> this does not work with firefox(mozilla)
>
>


MyNum.toString(10)+MyString

(10 is decimal, 16 would be hexadecimal)
 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      03-24-2005
TomislaW wrote on 24 mrt 2005 in comp.lang.javascript:

> "Evertjan." <> wrote in message
> news:Xns9623A2C94B347eejj99@194.109.133.29...
>> TomislaW wrote on 24 mrt 2005 in comp.lang.javascript:
>>> i have number that i need to concatenate with string

>>
>> result = 7 + " dwarfs of Snowwhite."

>
> this does not work with firefox(mozilla)


I don't believe it. It is basic javascript.

Could you try to debug with 6 dwarfs perhaps?


--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

 
Reply With Quote
 
John W. Kennedy
Guest
Posts: n/a
 
      03-24-2005
TomislaW wrote:
> "Evertjan." <> wrote in message
> news:Xns9623A2C94B347eejj99@194.109.133.29...
>
>>TomislaW wrote on 24 mrt 2005 in comp.lang.javascript:
>>
>>>i have number that i need to concatenate with string

>>
>>result = 7 + " dwarfs of Snowwhite."

>
>
> this does not work with firefox(mozilla)


It should. Please show exactly what you are doing that doesn't work.


---
John W. Kennedy
"I want everybody to be smart. As smart as they can be. A world of
ignorant people is too dangerous to live in."
-- Garson Kanin. "Born Yesterday"
 
Reply With Quote
 
Mick White
Guest
Posts: n/a
 
      03-24-2005
Lee wrote:

> TomislaW said:
>
>>"Evertjan." <> wrote in message
>>news:Xns9623A2C94B347eejj99@194.109.133.29...
>>
>>>TomislaW wrote on 24 mrt 2005 in comp.lang.javascript:
>>>
>>>>i have number that i need to concatenate with string
>>>
>>>result = 7 + " dwarfs of Snowwhite."

>>
>>this does not work with firefox(mozilla)

>
>
> Sure it does. Show us exactly what "does not work".
>


num="Zero,One,Two,Three,Four,Five,Six,Seven".split (",")

function fplural(word){return word.substring(0,word.length-1)+"ves"}
result=num[7]+" "+ fplural("dwarf")+" of Snow White";
document.write(result);

Mick
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Split string (then) Convert string into Integer news ASP General 2 05-26-2010 11:58 AM
is there a way to AutoParse a string to another type - e.g. if aDate format then date, else if integer than Integer etc ????? Greg Hauptmann Ruby 6 08-06-2008 04:52 PM
Change a string to an integer, report an error if the string does not represent an integer? Randy Kramer Ruby 12 10-25-2007 09:56 PM
convert scientific integer to normal integer les ander Python 4 10-05-2004 04:26 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57