Run
Online Code Editor
Example of Web Worker
Enter the number to find the square
Submit
Wait
Note:Try to enter a big number, and then click on other button. The page will respond properly