Not accessible to any webpage (true) but is easily accessible and easily editible via dev tools, such as chrome (ctl-shift-J). Therefore, custom crypto required before storing the value.
But, if javascript needs to decrypt (to validate) then the decrypt algorithm is exposed and can be manipulated.
Javascript needs a fully secure container and the ability to properly implement private variables and functions that are available only to the js interpreter. But, this violates user security - since tracking data can be used with impunity.
Consequently, javascript will never be fully secure.