Using JavaScript ES6, I am surprised that doing:
const a = {}; a.foo = 'bar'; a.foo = 'car'; Is valid. Why is this? I would have assumed const would mean you cannot change the a empty object and apply new properties. Even further, I would also have assumed you cannot change the value of a property of a once it is set.
final(which might correctly imply that this is the final value the variable will hold) instead ofconst(which might falsely imply that the value of this variable are constant and cannot be changed). Writeconst, but imagine it saysfinalinstead when declaring constant javascript variables.