Use .length rather than Array.getLength