How can one render Handlebars variables inside a custom helper block?
问题 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