Why does sometimes the javascript documentation uses var and other times it uses let and const

Why does sometimes the javascript documentation uses var and other times it uses let and const ?

like this

( from Redirecting... )

@eleanorjmorel The var and const are used to indicate when the variable is mutable or the reference is immutable. It makes little difference in these examples just meant to be visually clearer. We can always change it to follow a consistent style if it makes it clearer.