outputs index and value of each arugment passed in