There is no main function in javascript. The main function is often used in Java and C languages. It is also called the main function and is required to have a return value. Returning 0 means that the program is successfully executed normally, and returning a non-0 value means that the program ends abnormally; but this function does not exist in JavaScript.