[Javascript] sort replace question

Matt Barton javascript at mattbarton.org
Tue Feb 28 10:42:02 CST 2006


// -----
var y = 3.5;
var x = parseFloat(y);

var z = y.toString();
alert(z);
// -----

Matt

Michael Borchers wrote:
> what's wrong then?! :(
>  
>  var y = 3.5;
>  var x = parseFloat(y);
>  
>  var z = toString(y);
>  alert(z);
>  
> gives out: [object Window]
> 
>     On 2/28/06, *Hassan Schroeder* <hassan at webtuitive.com
>     <mailto:hassan at webtuitive.com>> wrote:
> 
>         Michael Borchers wrote:
>          > i have a flot f.e. 2.5
>          > and would like to replace the . with a _
>          >
>          > myFloat.replace('.', '_');
> 
>           myFloat.toString().replace('.', '_');
> 
> 
> --
> This email has been verified as Virus free
> Virus Protection and more available at http://www.plus.net
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript



More information about the Javascript mailing list