Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMatthew Akroyd
Full Stack JavaScript Techdegree Student 11,975 Pointsthe question isn't getting passed to the h2 element in the card.pug file
i've been following along to the video but when I got to the section on having the cards come up in random order when loading the page it stopped working all together so I went back and tried doing it from scratch and now when I try to pass the prompt to the h2 element in the card.pug file it doesnt show up but the hint does im not sure whats going wrong but here's my code for it
const express = require('express');
const router = express.Router();
const { data } = require('../data/flashcardData.json');
const { cards } = data;
router.get('/', (req, res) => {
res.render('card', {
prompt: cards[0].question,
hint: cards[0].hint
});
});
module.exports = router;