Write a java script function that accepts integer array as
input, and display a new array by
performing fol
lowing modifications,
•
The values in odd index positions must be incremented by 1
•
The values in even index positions must be decremented by 1.
•
Assume the array index starts from 0.
Input 1: arr = [1,2,3,4]
Output 1: arr = [0,3,2,5
it done html and javascript and plz do it in simple way