- This types of function is called anonymous function.
- In this example defined function is called before DOM is initialize.
- This function call before execute the document ready statement.
Code:-
- <!DOCTYPE html>
- <html>
- <head>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <script>
- (function()
- {
- alert("Invoked");
- })()
- </script>
- </head>
- <body>
- </body>
- </html>
Immediately invoke function :- JavaScript
Reviewed by Network security
on
November 11, 2019
Rating:
No comments: