JavaScript and IE11

Note to Internet Explorer 11 JavaScript Programmers.

Internet Explorer 11 implemented a version of JavaScript called ES5 – This was considered the state of the art in 2009. However in 2015 ES6 (aka ES 2015) was released, and it had quite a lot of enhancements, then in 2017 ES 2016 was released, then in 2018 ES 2018 was released, in 2019 ES 2019 was released.

In short, JavaScript has evolved quite a lot to the point where a lot of today’s JavaScript developers write code like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
getEmployees() {
this.service
.getEmployees()
.subscribe(
result => {
if(result.wasSuccessful === false){
alert('oops');
}else{
this.employees = result.model;
}
console.log(result);
},
error => console.error(error)
);
}

If you study the code carefully, you see

  • output of a function is being fed into another function …getEmployees().subscribe
  • are whole statements, and even functions in place of parameters of functions.
  • => { notation – which I think means for each object coming in , call that object ‘result’ and execute the following code on it. (the stuff after =>