javascript data type ?

Hi ,
I am sending a function an array of values
which contain ‘09’ , ‘15’,‘20’ ,…etc
everything is working fine except when I have to do something with ‘09’ it seems to truncate off the zero at the begining and pass to the function a 9 instead of a 09

What I want to know is how do I make the function interpert the value as 09 it seems to be converting the parameter to a number instead of the string value ‘09’

array[0] = ‘09’;
array[1] = ‘15’;
…etc

Thanks for any help

sithum,
can you give more detail about what you’re trying to do with the values?

I tried your example:


<html>
<body>
<script type="text/javascript">
var arr = new Array();
arr[0] = '09';
arr[1] = '15';
arr[2] = '20';
for(var i in arr)
  document.write(arr*+'<br/>');
</script>
</body>
</html>

which seems to render fine as


09
15
20

–Ryan*