How do i get variable data from outside a callback function scope?

201 Views Asked by At

I'm trying to get the values of the current position of the range slider, so as to put in an object for my ajax request...

let minPrice;
let maxPrice;
$('.range-slider').on('start', function(input) {
   minPrice = input.from;
   maxPrice = input.to;         
});       
console.log(minPrice,maxPrice);                                 
0

There are 0 best solutions below