I'm trying to get two Handlebars variables to render inside a custom Handlebars helper I've created.

I'm using the Express.js view engine for handlebars.js, and in my `app.js` have set up a helper to compare equality:

```
const hbs = require('hbs');

app.set('view engine', 'hbs');

hbs.registerHelper('ifEqual', (a, b, options) => {
  if (a === b) {
    return options.fn(this);
  }
  return options.inverse(this);
});

```

My controller passes two variables to the view:

```
res.render('my-view', {
  x: 3,
  y: 3,
});

```

In `my-view.hbs` I'd like to render the variables if they're equal, so I tried:

```
{{#ifEqual x y}}
  foo
  {{x}}
  {{y}}
{{/ifEqual}}

```

The result is only `foo` renders. Why don't `{{x}}` and `{{y}}` render here? Do I need to do this with a partial?