Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript

Matthew Akroyd
seal-mask
.a{fill-rule:evenodd;}techdegree
Matthew Akroyd
Full Stack JavaScript Techdegree Student 9,069 Points

the 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;