-2

I was looking at bootstrap.js file and I noticed a strange (to me) notation for declare functions for plugins

Is there a difference between these two declaration:

function($)

and

function ($)

if it is not clear there is a blank char between function and ($) in the second declaration. I'm wondering of this because sublime text gives me two different color on ($)

steo
  • 4,375
  • 2
  • 30
  • 60
  • possible duplicate of [What does the exclamation mark do before the function?](http://stackoverflow.com/questions/3755606/what-does-the-exclamation-mark-do-before-the-function) – Quentin Jul 14 '13 at 09:32
  • I asked another question too – steo Jul 14 '13 at 09:32

1 Answers1

3

No, it makes no difference.

JavaScript is mostly white space independent language, so apart from obvious cases (as in inside string or regex literals), and some not so obvious corner cases (multi-line return statements which sometimes break due to ASI), indentation and white space does not change the outcome of your code.

It seems to be a bug with the ST highlighter, and my OCD side also dislikes having differently colored $ signs in the code. =]

Community
  • 1
  • 1
Fabrício Matté
  • 65,581
  • 23
  • 120
  • 159