Why is the following html file showing title as default in IE? The other browsers show title as mytitle.
<script>
window.mylib = window.mylib || {};
mylib.title = 'mytitle';
</script>
<script>
var mylib = mylib || {};
document.title = mylib.title || 'default';
</script>
Does IE create a separate scope for each of the script tags?
And is that just a bug or why does the behavior differ?
(tested in IE8 and latest chrome/ff/opera)