why does twitter use the !function syntax in their embed code

Posted by samccone on Stack Overflow See other posts from Stack Overflow or by samccone
Published on 2012-01-04T15:48:58Z Indexed on 2012/04/04 5:29 UTC
Read the original article Hit count: 95

Filed under:
|

I was looking at twitters embed code and saw that they are using !function ... while i know that this evaluates to false I was wondering what the point of it was.

thoughts?

!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about tricks