Sure, create a Particle function with system.reset() and call said function using the JS API.
Could you show me how this code would look? Whats the difference between a particle function and a regular funciton
Checking the docs (reference section) would tell you more than I could. Alternatively, search the forums for “functions and variables tutorial”.