- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the syntax for leading bang! in JavaScript function?
To execute an anonymous function you need to use the leading bang! or any other symbol −
!function(){ // do stuff }();
You can also write it like −
+function(){ // do stuff }();
Even the following is an acceptable syntax −
~function(){ // do stuff return 0; }( );
Advertisements