working with console and arrays and index when one is written before the other how it changes things