(Services I) Formatting: .success & .error have extra indent?


#1

Why are .success and .error indented an extra time?

app.factory('forecast', ['$http', function($http) { 
  return $http.get('https://s3.amazonaws.com/codecademy-content/courses/ltp4/forecast-api/forecast.json') 
            .success(function(data) { 
              return data; 
            }) 
            .error(function(err) { 
              return err; 
            }); 
}]);

#2

White space has very little meaning in JavaScript, consequently indentation has no effect or bearing on the program.


#3

I'm aware but was wondering if this was a mistake or possibly the preferred way? Thanks!


#4

I can't speak for the author. They may have just wanted it to stand out.