In this article, we will see some of the most famous interview code snippets that are asked to check your knowledge about Javascript concepts. Let's get started. Predict the output of the below code: const user = { name: 'Raj', location: { ci...

Markdown supported · ⌘↵ to post
kishore kumar const is considered as block scoped.
We can declare a const variable with the same name in different blocks. Declaring a function creates a separate block scope so there is no reassignment error
Nice article as usual Yogesh Chavan. I love these little test snippets which I'm now starting to get better at solving since working on interview prep.
kishore kumar
It's a beginning
Yet again , Thanks for such a great article yogesh ... May i know how it is treated as no reassignment of number in this case .... as number is declared with const ... Thanks :)
const number = 1; const result = (function (number) { delete number; return number; })(10);