// есть массив нужно отнять от первого второе и от второго третье и тд и записать в новый массив var s = [1,2,3,4,5,6,7,8] //в массив по хорошему приходит разное количество значений for i in s { s[i] = s[i-2] - s[i-1] }
- and you can immediately sample the result. not entirely clear - take away the second from the first and write to the first? then from the second to the third and write to the second? - Max Mikheyenko
- and what to do with the latter, since there is no next - Max Mikheyenko
|