es6 · ES6 Basics
What will this function return?
(function() {
let f = this ? class g { } : class h { };
return [ typeof f, typeof h ];
})();Answers
- ["undefined", "undefined"]
- ["function", "function"]
- ["function", "undefined"]
- Error
es6 · ES6 Basics
(function() {
let f = this ? class g { } : class h { };
return [ typeof f, typeof h ];
})();