Might ask this on a different channel. I have this:
const reduceList = (list) => {
return list.filter(Boolean).reduce((a, b, c) => {
console.log({this});
});
};
console.log(reduceList([1, 2, 3]));
I get:
console.log({this}); ^
SyntaxError: Unexpected token } at new Script (vm.js:74:7) at createScript (vm.js:246:10) at Object.runInThisContext (vm.js:298:10) at Module._compile (internal/modules/cjs/loader.js:657:28) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Function.Module.runMain (internal/modules/cjs/loader.js:742:12) at startup (internal/bootstrap/node.js:266:19)
anybody know why that is? I am on Node.js version 11.