I know they do the same thing more or less, its just the approach on how its done.
<script src="example.js" type="text/javascript" charset="UTF-8"></script>
<script type="text/javascript">
function OptanonWrapper() { }
</script>
<script type="text/javascript">
var x = x || [];
(function(){
setTimeout(function(){
var d = document, f = d.getElementsByTagName('script')[0], s = d.createElement('script'); s.type = 'text/javascript';
s.async = true; s.src = "example.js"; f.parentNode.insertBefore(s,f);
}, 1);
})();
</script>
--
I am not a native js programmer so your help would be greatly appreciated.