Arduino Loop Through Array Javascript Length Converter