JavaScript Express Basics Parameters, Query Strings, and Modularizing Routes Randomize Cards

Hamzah Iqbal
seal-mask
.a{fill-rule:evenodd;}techdegree
Hamzah Iqbal
Full Stack JavaScript Techdegree Student 11,144 Points

What is the purpose of the ID?

I can't see the purpose for using the id within the templateData, that is const templateData = { id, hint };

What is the functionality of the ID, and why is it passed in as an argument?

1 Answer

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 87,073 Points

Without looking at it too closely it looks like the ID parameter refers to an ID field in a set of structured data that makes up the card details. It's a unique identifier for your data model.