Hey @Shreshthaseth if you want to get a variable by its name as a string (like your b = “a” example), you could use the global object or a lookup object:
var a = 1;
var b = "a";
window[b]; //
gives the value of a if a is global
Or better, store variables in an object:
const vars = { a: 1 };
const b = "a";
console.log(vars[b]); // 1
This lets you “indirectly” access values by name, which is somewhat similar to pointer dereferencing, but it’s not actual pointers.