Execute_async_script v/s execute_script in Selenium web-driver

In Selenium web-driver we know web-driver has 2 methods -

(WebDriver::Element, …) execute_async_script(script, *args) and

(WebDriver::Element, …) execute_script(script, *args).

Now with the help of any code where “*args” would be
web-driver::element, Can any explain the differences between them? In
what situations we must use what ?


The documentation is here:

Basically the async version doesn’t wait for a return, your script
continues to execute.