AFAIK, Number (x) would return NaN as soon as it finds any character that's digit/number... Where as parseFloat (x) does some effort to find out the number until it encounters NaN character...
-abdul On 10/31/07, reflexactions <[EMAIL PROTECTED]> wrote: > > Thanks anyway for the reply, though I wasnt really asking what the > difference is between Number and parseFloat I was asking more > specifically about the difference between Number and parseFloats > string parsing capabilities. > > --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>, "Abdul > Qabiz" <[EMAIL PROTECTED]> > wrote: > > > > > > > > Is there anything that Number() parses that parseFloat doesnt? > > > > > > > There are differences:- > > > > 1) Number is type where as parseFloat () is a global-function > > 2) Number (x) tries to cast x to Number where as parseFloat (x) > reads, or * > > parses*, and returns the numbers in a string until it reaches a > character. > > > > We use Number for typing, casting generally. > > > > Does that make sense? > > > > > > On 10/31/07, reflexactions <[EMAIL PROTECTED]> wrote: > > > > > > Just looking at parsing strings into a Number i.e. > > > parseFloat(string) or Number(string) > > > > > > It seems to me that parseFloat does everything Number does plus a > > > little bit more (it will accept trailing non-numeric characters). > > > > > > Is there anything that Number() parses that parseFloat doesnt? > > > > > > tks > > > > > > > > > > > > > > > > > -- > > -abdul > > --------------------------------------- > > http://abdulqabiz.com/blog/ > > --------------------------------------- > > > > > -- -abdul --------------------------------------- http://abdulqabiz.com/blog/ ---------------------------------------