Javascript is dynamically weakly typed but it is still typed, typeof/instanceof exist for a reason.
my point is if you are using a weakly typed language, it doesn't care much about developer intent with respect to type. so why would it be concerned with developer intent with respect to mutability? seems arbitrary.