When I used axios.post, I met this problem
var len =5;
var a ={};
function abc(temp){
console.log(temp);
axios.post("/",temp);
}
while(len--){
a.name = len;
abc(a);
}
when I run this code in console, it will send 5 time request with the same payload.
The cause is var || let
?
but when I used $.ajax
, it works normally.
I wanna an answer, Thanks a lot.