Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES6 keywords behaves as variable #124

Open
shaheerkhan12605 opened this issue Jun 28, 2019 · 0 comments
Open

ES6 keywords behaves as variable #124

shaheerkhan12605 opened this issue Jun 28, 2019 · 0 comments

Comments

@shaheerkhan12605
Copy link

shaheerkhan12605 commented Jun 28, 2019

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?

@shaheerkhan12605 shaheerkhan12605 changed the title Reserved words behaves as variable ES6 keywords behaves as variable Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant