Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7562217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:21:39+00:00 2026-05-30T13:21:39+00:00

Bootstrap css uses the following: !function( $ ) { }( window.jQuery ) That’s different

  • 0

Bootstrap css uses the following:

!function( $ ) {
}( window.jQuery )

That’s different than the self-invoking anonymous function call that I originally learned:

(function($) {
})(jQuery);

Q: Is that just preference you think? I mean the not symbol instead of enclosing it in parenthesis.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T13:21:41+00:00Added an answer on May 30, 2026 at 1:21 pm

    “Q: Is that just preference you think?”

    Yes, but using a unary ! operator, you can avoid a few bugs when you forget a semicolon before the IIFE, which can cause the () to be interpreted as a function call.

    alert('foo')  // alerts 'foo'
    
    (function() {  // TypeError: undefined is not a function
        alert('bar');
    })()
    

    Here the outer () is interpreted as a function call. It’s trying to call whatever was returned from the alert() function, which of course returns undefined, which isn’t a function.


    alert('foo')  // alerts 'foo'
    
    !function() {
        alert('bar');  // alerts 'bar'
    }()
    

    No troubles with this one, since the ! is a unary operator that only evaluates the operand to its right.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page that I have started building with the Twitter Bootstrap css
can we use jquery ui with twitter-bootstrap ? or it will lead to css
I am using Twitter Bootstrap as Css framework and thinking why waste that space
In the following example http://twitter.github.com/bootstrap/base-css.html#forms There is a text field with text Type something...
Bootstrap css uses the halflings from Glyphicons . If I purchased their full product
In my bootstrap.php I have the following: if($_SERVER['SERVER_NAME'] == 'localhost') Kohana::$environment = 'development'; else
I am currently writing a little bootstrap code for a service that can be
Ive got a url: http://dev.local/foodies/view?id=bluedaniel and ive got in my bootstrap: protected function _initRoute()
Login Form: $authAdapter = Zend_Registry::get('authAdapter'); $authAdapter ->setIdentity($formData['email']) ->setCredential($password) ->setCredential(1); Bootstrap: protected function _initAuth(){ $this->bootstrap('db');
I am using the twitter bootstrap css toolkit for building master page for an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.