The reason you couldn’t assign the let variable is because you were declaring it at the same time, which you had already done. After a variable has been declared, just do a = 4 instead of let a = 4. Same goes for var, which you shouldn’t be using anyway.
However, if you do want a variable that can’t be re-assigned after the first time, use const instead of let.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The reason you couldn’t assign the
let
variable is because you were declaring it at the same time, which you had already done. After a variable has been declared, just doa = 4
instead oflet a = 4
. Same goes forvar
, which you shouldn’t be using anyway.However, if you do want a variable that can’t be re-assigned after the first time, use
const
instead oflet
.