Edits to sum_of_range and range_array for Eloquent Javascript