My requirement is to call 3 ajax call in parallel then only on complete of the 3 calls , I am requesting one more Ajax call. So for i am able to achieve this by the following this article by Chris from CSS-trick
`$.when(
$.get("url1"), //goes in parallel
$.get("url2"), //goes in parallel
$.get("url3") //goes in parallel
).then(
$.get("url4") // fires only on completion of 3 calls above.
);`
But my code stuructre is like
`$.when(
threeCalls(){
//this gives 3 ajax calls from here
})
.then(
singlecall(){
//this shoould be only called after 3 calls been successfull
})`
This way it does not wait for the singlecall()
to wait for the threecalls()
method to finish and all calls(4 of them) goes in parallel/async.
How i should achieve this?