Why "Const" has a block scope not a function scope

Why “const” variable has a block scope not a function scope. Please explain me with the help of a suitable JavaScript Code.

Constants are block-scoped, much like variables declared using the let keyword. The value of a constant can’t be changed through reassignment, and it can’t be redeclared.
Eg:
const number = 42;

try {
number = 99;
} catch (err) {
console.log(err);
// expected output: TypeError: invalid assignment to const `number’
// Note - error messages will vary depending on browser
}

console.log(number);
// expected output: 42

I would say go through MDN docs as they are very precise and explain better than me, if you still have doubts you can reply back.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.