what does the ! mean in Angular? i.e $scope.selected = !$scope.selected; : <p>I was wondering what does the ! actually mean in this method</p>

<pre><code> $scope.toggleSelected = function () {
      $scope.selected = !$scope.selected;
    };
</code></pre>

<p>I understand it's allowing me to set a selected item and it won't work without it  but what exactly is the ! for?</p>
