I have two function and I need to execute it at same time using javacript or any parallel function. How can i do?
Thank so.
I have two function and I need to execute it at same time using javacript or any parallel function. How can i do?
Thank so.
I'm not sure you'll find exactly what you're looking for. Does it have to be exactly at the same time? Javascript is single-threaded. But you could do async calls. Would that meet your use case? If not, you could check out Web Workers, but I've never used that before.
JavaScript is fundamentally not multithreaded. It just processes events in a single pipeline.
There is an npm package that can do multithreading if that's what you really need here: