Inside a foreach loop in HBS I am trying to display the data which is inside a different variable.
Here's the route and the data which is being passed to the hbs:
const info = [
{
name: "kakashi",
age: 22,
gender: "Male"
},
{
name:"Samsung",
age: 34,
gender: "Male"
}
]
const num = 2234453453;
app.get('/', (req,res)=>{
res.render('index', {info, num})
});
app.listen(8000);
Here's my front end :
{{#each info as |d|}}
{{d.name}}
{{num}}
{{/each}}
here each loop is working fine, but why is the data inside the num
not being displayed