I was asking myself if there is a way to add something like a subproperty to a variable. Here is an example of what I want to achive:
var variable = 5;
variable.property = "what ever...";
console.log(variable); //outputs 5
console.log(variable.property); //outputs "what ever..."
(The data types aren't important...)
Is there maybe a way to achive this using getters or Proxys, and does my variable need to be an object or not?
Hopefully you can help and there is a way to do this :)