I’m actually unfamiliar with how scope works with regards to .isClient and .isServer I also don’t know what the best way to do what you are trying to do is without making everything global which doesn’t seem like an ideal solution. Maybe someone else has some insight to this. Sorry I couldn’t be more useful.
For a variable to be available globally in Meteor, you should declare it without the var keyword. Meteor automatically wraps your files in functions to make sure local variables don’t leak out.
He means that Meteor puts the code in a function, like this:
(function () {
var hello = "hello";
})();
This automatically runs the function and makes hello a local variable inside the function. When you run code inside the console, the code would be ran outside this function. The code in the console would then have no access to the variable hello. Instead, if you omit the “var” before hello, it makes it a global variable; and the code in the console would then have access to the global variable.