Input Array In Javascript Functions With Parameters