Answer for http://stackoverflow.com/questions/3326650/console-is-undefined-error-for-internet-explorer

JavaScript

window.log = function () {
    if (this.console && this.console.log) {
        this.console.log(Array.prototype.slice.call(arguments));
    }
}

log("happy me", this);


function caseInSwitch(val) {
  var answer = "";
  // Only change code below this line
  switch (val) {
  
  case 1:
      answer = "alpha";
      break;
  
  case 2:
       answer = "beta"; 
       break;

  case 3:
       answer = "gamma";
       break;
 
  case 4:
       answer = "delta";

  
  // Only change code above this line  
  return answer;  
}
}
// Change this value to test
caseInSwitch(2);