(function () {
"use strict";
function initialize() {
myList = ['one', 'two', 'three'];
}
function displayList() {
var i, n;
for (i = 0, n = myList.length; i < n; i += 1) {
alert(myList[i]);
}
}
initialize();
displayList();
})();
if not using var, the myList variable will supposedly be created as a globle variable. Either way, the code should be running. What is wrong with the code??