Https://www.freecodecamp.org/news/var-let-and-const-whats-the-difference/

Dear freecode camp team,

I think there is a mistake in the forth example of const in the given link =>

    const greeting = {
        words: "Hello",
        number: "five"
    } // error:  Assignment to constant variable.
   // This code actually works

Thanks & Regards,
Amit Shrestha

on its on you are right, but I think it is intended that you can’t write it after the previous snippet

:thinking: mm… code snippet is actually incomplete.

This is the correct one =>

const greeting = {
    words: "Hello",
    number: "five"
}
greeting = {
    words: "Hello",
    number: "five"
}
 // error:  Assignment to constant variable.

it doesn’t make sense to reassign the same thing, even if to show a feature… but if you think it’s incomplete

Thank you for helping make FCC better. Bugs can be reported as GitHub Issues. Whenever reporting a bug, please check first that there isn’t already an issue for it and provide as much detail as possible.

How will a beginner reader will understand from that example ? It says the code should not work & should give an error but the code is working properly with no error. Even after combining with previous code the error given is incorrect. Anyways this was just a suggestion. Thanks for replying :+1:. I will surely give it a try to explain this in Github Issues.