I'm writing a simple program to teach the basic of input, form and template and sessions using Meteor.
 if (Meteor.isClient) {
 Session.set('value',0);
 Template.hello.helpers({
 result: function(){
  return(Session.get('value'));
}
});
Template.hello.events({
 'submit form': function(event) {
  event.preventDefault();
  var s1=event.target.num1.value;
  var s2=event.target.num2.value;
  var s = s1 - s2;
 Session.set('value',s);
}
}); }
The problem is when the operator is changed to + it seems to concatenate the two numbers. Other basic operators work fine. It is a bug ? This is the simplest example I can teach to my students and I get stuck.
I'm using Mac 10.6.8 and Meteor 1.1.0.2
 
     
    