I wrote myself a Javascript function for appending Javascript files to the DOM, I'm fairly new to javascript and as such my solution was fairly verbose. So after a little googling I found this seemingly really cool trick for appending javascript files. Now I'm reluctant to replace my code with the cool new trick till I fully understand how it functions.
Here's the new code.
!function(b){function c(){if(d=e.shift())a=b.body.appendChild(b.createElement("SCRIPT")),a.onload=c,a.src=d}var e=[
'https://www.google.com/jsapi?key=MY_API_KEY',
'https://apis.google.com/js/client.js?onload=initPicker'
],a,d;c()}(document);
Please could someone clear up just what is happening here?