---
title: "Comment by kishore kumar on \"Tricky Javascript Code Snippets Asked In the Interview\" | Hashnode"
description: "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 co"
url: "https://hashnode.com/posts/tricky-javascript-code-snippets-asked-in-the-interview-1/6088f41c586b183dbcfff7cb/comment/60898d3f72387b583d1497de"
---

[Discussion](https://hashnode.com/posts/tricky-javascript-code-snippets-asked-in-the-interview-1/6088f41c586b183dbcfff7cb)

Comment [Tricky Javascript Code Snippets Asked In the Interview](https://hashnode.com/posts/tricky-javascript-code-snippets-asked-in-the-interview-1/6088f41c586b183dbcfff7cb)

[kishore kumar](https://hashnode.com/@kch)

[Apr 28, 2021](https://hashnode.com/posts/tricky-javascript-code-snippets-asked-in-the-interview-1/6088f41c586b183dbcfff7cb/comment/60898d3f72387b583d1497de)

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);
```

[Yogesh Chavan](https://hashnode.com/@myogeshchavan97)

[Apr 28, 2021](https://hashnode.com/posts/tricky-javascript-code-snippets-asked-in-the-interview-1/6088f41c586b183dbcfff7cb/comment/60898d3f72387b583d1497de#reply-608996581bb72c5818620133)

[kishore kumar](https://hashnode.com/@kch) `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

[kishore kumar](https://hashnode.com/@kch)

[Apr 29, 2021](https://hashnode.com/posts/tricky-javascript-code-snippets-asked-in-the-interview-1/6088f41c586b183dbcfff7cb/comment/60898d3f72387b583d1497de#reply-608a1f5772387b583d14a061)

[Yogesh Chavan](https://hashnode.com/@myogeshchavan97)

ahh makes sense ... Thanks yogesh for your kind exp :)
