I'm new to Meteor and I don't quite get the whether my variables will be available to the client or server or both.
var variable_1 = [];
if (Meteor.isClient) {
var variable_2 = [];
}
if (Meteor.isServer) {
var variable_3 = [];
}
In this example if I use Meteor.method in the server side on variable_1, will I be able to access whatever I just did to variable_1 from client? Can I access variable_2 with a method in Meter.isServer? What is the difference between the scope of variable_1 and variable_2? I'm guessing that variable_1 is accessible to both client and server, variable_2 is just client, and variable_3 is just server. However, I'm quite unsure about guess on the scope of variable_1. Does anyone know?