A comprehensive list of new ES features, including ES2015 (ES6), ES2016 (ES7), ES2017 (ES8), ES2018 (ES9), ES2019 (ES10) - daumann/ECMAScript-new-features-list
ECMAScript 2019 has landed! It's time to look what's new and... go beyond that! ECMA-262 and ECMAScript 2019 release cycle, features, proposals and more!
Definition 4: This value: in JavaScript this value is dynamically scoped, unless used in an arrow function.
That’s correct: as we know, the value of this is determined and provided exactly by the caller.
function produce() {
console.log(this.x);
}
const alpha = {produce, x: 1};
const beta = {produce, x: 2};
const gamma = {produce, x: 3};
console.log(
alpha.produce(), // 1
beta.produce(), // 2
gamma.produce(), // 3
);
H. Santos, P. Alves, I. Costa, and F. Quintao Pereira. Proceedings of the 2013 IEEE/ACM International Symposium on Code Generation and Optimization (CGO), page 1--11. IEEE Computer Society, (2013)
L. Salucci, D. Bonetta, S. Marr, and W. Binder. Proceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, page 40:1--40:2. ACM, (March 2016)