Match.Result javascript function