ES6 keywords behaves as variable
shaheerkhan12605 opened this issue · comments
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?