Is it possible to create a variable that is scoped to a template? This variable can be shared among the different helpers in the template, but does not exist outside of the template.
In this example below, how can game variable be shared between the 2 templates without repeating its definition? Initializing it using var makes it global which is not what I want. Thank you!
Template.userInfo.game = function() {
var game = 'Angry Bird';
return game + ' game';
};
Template.userInfo.score = function() {
var game = 'Angry Bird';
return game + ' score';
};