18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
is this correct var $arr = [];
hi,
my array don't seem to work. is this correct?
var $arr_animals = [];
$arr_animals[] = {cat,dog,fish,mouse};
coz i got this:
[Exception] SyntaxError: syntax error
i want to check if those animals mentioned in the array are in the select options i have. i tried it on a turbo c program and it seems to be working fine....
why do i get a syntax error with that?
thanks,
=Tinchie=
my array don't seem to work. is this correct?
var $arr_animals = [];
$arr_animals[] = {cat,dog,fish,mouse};
coz i got this:
[Exception] SyntaxError: syntax error
i want to check if those animals mentioned in the array are in the select options i have. i tried it on a turbo c program and it seems to be working fine....
why do i get a syntax error with that?
thanks,
=Tinchie=
Comments
Try using this:
var $arr_animals = ;
or
var $arr_animals = new Array();
$arr_animals[0] = "cat";
$arr_animals[0] = "dog";
$arr_animals[0] = "fish";
$arr_animals[0] = "mouse";
Regards,
Pankaj.
$arr_animals[0] = "cat";
$arr_animals[1] = "dog";
$arr_animals[2] = "fish";
$arr_animals[3] = "mouse";
The typical copy paste problem..;-)
Thanks lepierrot