added "var" to variable declarations in array demo