init in javascript
function init() { // initialisation stuff here } // elsewhere in code init();
Here is what the above code is Doing:
1. We create a function called init.
2. We call the function.
The function is called init. It doesn’t take any arguments. It doesn’t return anything. It just prints a message.
The function is called by writing its name followed by parentheses.