Explain the role of the $scope object.

$scope is an object that binds the controller and view, enabling data exchange. It serves as a “glue” between them, where any properties or functions on $scope become accessible in the view.

app.controller('MainController', function($scope) {
  $scope.greeting = "Hello, World!";
});