es6-features
es6-features copied to clipboard
ES6 keywords behaves as variable
I have a code that i was expecting will return 'undefined' or any error but it gives output as mentioned.
let i = (x, c) => { c(x); }; i(20, (undefined) => { let j = undefined; console.log(j); // output 20 });
function y(undefined) { let a = undefined; console.log(a); //output 90 } y(90); // same result with let,promise,map,filter How keywords works and change behavior if used as function arguments?