B
Bob
Unlike VBScript, the arrays in Javascript are objects that
have methods and properties. The following example defines
an array in Javascript. How can I achieve the same in
VBScript? Can someone convert the following function
(arrayTest ()) defined in Javasctipt to its equivalent in
VBScript and/or in VB6?
To understand the function, create an HTML file with the
following and open the file:
Thanks in advance,
Bob
<html>
<head>
<script language="javascript">
function arrayTest()
{
var i;
symbols = [{person:"Bob", age:"26",
gender:"male"}, {person:"Amy", age:"23",
gender:"female"}]
alert(symbols.length);
for (i=0; i<symbols.length; i++)
{
alert(symbols.person);
alert(symbols.age);
alert(symbols.gender);
}
}
</script>
</head>
<body onload="arrayTest()">
Testing for Arrays in javascript
</body>
</html>
have methods and properties. The following example defines
an array in Javascript. How can I achieve the same in
VBScript? Can someone convert the following function
(arrayTest ()) defined in Javasctipt to its equivalent in
VBScript and/or in VB6?
To understand the function, create an HTML file with the
following and open the file:
Thanks in advance,
Bob
<html>
<head>
<script language="javascript">
function arrayTest()
{
var i;
symbols = [{person:"Bob", age:"26",
gender:"male"}, {person:"Amy", age:"23",
gender:"female"}]
alert(symbols.length);
for (i=0; i<symbols.length; i++)
{
alert(symbols.person);
alert(symbols.age);
alert(symbols.gender);
}
}
</script>
</head>
<body onload="arrayTest()">
Testing for Arrays in javascript
</body>
</html>