title: How i stop the notification counter to zero in Js?
body: <p>I am working on notifications in JavaScript when i push notifications it shows the counter but when i want that when i open one notification the number of counter decreases till zero for example first counter shows number seven means seven notifications there but when i open one of them it shows counter with value 6 and so on till it reaches counter value zero but in my case i have write a line of code when the counter value reaches to zero it goes to negative values like -1 -2 -3 and so on?how i stop this to only zero counter value?</p>
  
  <pre><code>$('#btn').click(function() {
      $('#noti_Counter').html(function(i, val) { 
          return val*1+1 
      }); 
  </code></pre>