Question: JavaScript Write a method `adjacent_sum` that takes in an array of numbers and returns a new array containing the sums of adjacent numbers in the

JavaScript

Write a method `adjacent_sum` that takes in an array of numbers and returns a new array containing the sums of adjacent numbers in the original array.

Ex:

adjacent_sum([3, 7, 2, 11]); // [10, 9, 13], because [ 3+7, 7+2, 2+11 ]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!