I am trying to calculate the inc and get the value returned so I can use it later . I am taking the value from two funcitons . Functions actually work and if I console.log(inc) it in a function , i get the value printed . But if I do it outside like you can see in the code, I just get 0, or rather , nothing happens. How can I return the value and use it later in my code ?
The value inc , I get from the clicked buttons + and -. If the buttons get clicked , they go up or down a number in range of -3 to 3 .

var zoomIn = $('.s-plus');
var zoomOut = $('.s-minus');
var inc = 0;
zoomIn.on('click', function positive() {
inc = inc + 1;
if (inc > 3) {
return inc = inc - 1;
}
})
zoomOut.on('click', function negative() {
inc = inc - 1;
if (inc < -3) {
return inc = inc + 1;
}
})
console.log(inc);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="image-magnifier-container magnify">
<div class="zoom">
<span class="s s-plus"><span class="hide">zoom-in</span></span>
<span class="s s-minus"><span class="hide">zoom-out</span></span>
</div>
</div>