✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
    • Showing results for:
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards
    • Close
  • josephweiss2
    josephweiss2
    8,698 Points

    Other solution

    Posted on Dec 2, 2022 by josephweiss2
    josephweiss2
    8,698 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    1 Answer

  • karan Badhwar
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    karan Badhwar
    Web Development Techdegree Graduate 18,135 Points

    is it ok to remove the http://localhost:3000/card/

    Posted on Mar 22, 2022 by karan Badhwar
    .a{fill-rule:evenodd;}techdegree seal-36
    karan Badhwar
    Web Development Techdegree Graduate 18,135 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    1 Answer

  • Thomas Karageorgiadis
    Thomas Karageorgiadis
    6,739 Points

    Logic in routes Vs in templates?

    Posted on Jan 5, 2022 by Thomas Karageorgiadis
    Thomas Karageorgiadis
    6,739 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    1 Answer

  • Hanwen Zhang
    Hanwen Zhang
    20,084 Points

    What does this line ' const templateData = { id, text, name };' means in the code? Why do we use { }? what type of data?

    Posted on Apr 27, 2021 by Hanwen Zhang
    Hanwen Zhang
    20,084 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    3 Answers

  • Sean Paulson
    Sean Paulson
    6,669 Points

    My solution using pugjs

    Posted on Feb 23, 2021 by Sean Paulson
    Sean Paulson
    6,669 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    2 Answers

  • Steve Fau
    Steve Fau
    5,622 Points

    Solution working only halfway, but the code is the same in both cases..?

    Posted on Dec 31, 2020 by Steve Fau
    Steve Fau
    5,622 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    0 Answers

  • James Crosslin
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    James Crosslin
    Full Stack JavaScript Techdegree Graduate 16,882 Points

    My solution to adding the question and answer links

    Posted on Nov 13, 2020 by James Crosslin
    .a{fill-rule:evenodd;}techdegree seal-36
    James Crosslin
    Full Stack JavaScript Techdegree Graduate 16,882 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    1 Answer

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

    Cant we just use a(href=`${id}?side=${showSide}`)

    Posted on Jul 7, 2020 by Hamzah Iqbal
    .a{fill-rule:evenodd;}techdegree
    Hamzah Iqbal
    Full Stack JavaScript Techdegree Student 11,145 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    1 Answer

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

    What is the purpose of the ID?

    Posted on Jul 7, 2020 by Hamzah Iqbal
    .a{fill-rule:evenodd;}techdegree
    Hamzah Iqbal
    Full Stack JavaScript Techdegree Student 11,145 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    2 Answers

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

    404 is returned

    Posted on Jul 7, 2020 by Hamzah Iqbal
    .a{fill-rule:evenodd;}techdegree
    Hamzah Iqbal
    Full Stack JavaScript Techdegree Student 11,145 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    0 Answers

  • Zimri Leijen
    Zimri Leijen
    11,835 Points

    my solution

    Posted on Jan 9, 2020 by Zimri Leijen
    Zimri Leijen
    11,835 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    1 Answer

  • Bobby Brice
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Bobby Brice
    Full Stack JavaScript Techdegree Student 10,909 Points

    anchor tag is displaying, '=sideToShowDisplay' rather than Question and Answer

    Posted on Dec 4, 2019 by Bobby Brice
    .a{fill-rule:evenodd;}techdegree
    Bobby Brice
    Full Stack JavaScript Techdegree Student 10,909 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    1 Answer

  • polentz
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    polentz
    Full Stack JavaScript Techdegree Student 11,755 Points

    Why in the pug template he did not have to include the /cards part of the url?

    Posted on Oct 15, 2019 by polentz
    .a{fill-rule:evenodd;}techdegree
    polentz
    Full Stack JavaScript Techdegree Student 11,755 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    1 Answer

  • Ran Wang
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Ran Wang
    Full Stack JavaScript Techdegree Graduate 32,191 Points

    How can the template read the properties?

    Posted on Mar 20, 2019 by Ran Wang
    .a{fill-rule:evenodd;}techdegree seal-36
    Ran Wang
    Full Stack JavaScript Techdegree Graduate 32,191 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    1 Answer

  • Nicholas Smay
    Nicholas Smay
    14,768 Points

    Question link not showing up

    Posted on Mar 19, 2019 by Nicholas Smay
    Nicholas Smay
    14,768 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    1 Answer

  • Dehn Hunsworth
    Dehn Hunsworth
    7,189 Points

    cant get server running

    Posted on Feb 21, 2019 by Dehn Hunsworth
    Dehn Hunsworth
    7,189 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    0 Answers

  • Remi Vledder
    Remi Vledder
    14,144 Points

    Express: Possible to redirect to a random card page that does not have the current cards page ID?

    Posted on Dec 27, 2018 by Remi Vledder
    Remi Vledder
    14,144 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    2 Answers

  • Damian McCarthy
    Damian McCarthy
    3,656 Points

    The ID variable comes up as undefined when I click the link, The other variable works fine though

    Posted on Jul 15, 2018 by Damian McCarthy
    Damian McCarthy
    3,656 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    1 Answer

  • Stephen Powers
    Stephen Powers
    12,091 Points

    Url issues

    Posted on Jun 17, 2018 by Stephen Powers
    Stephen Powers
    12,091 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    1 Answer

  • Brian Patterson
    Brian Patterson
    19,588 Points

    Pretty sure his code is wrong!

    Posted on Mar 12, 2018 by Brian Patterson
    Brian Patterson
    19,588 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    4 Answers

  • Brian Patterson
    Brian Patterson
    19,588 Points

    Getting a 404 when I click the answer link.

    Posted on Mar 12, 2018 by Brian Patterson
    Brian Patterson
    19,588 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    2 Answers

  • Brian Patterson
    Brian Patterson
    19,588 Points

    Again! Haven't a scooby do!

    Posted on Mar 12, 2018 by Brian Patterson
    Brian Patterson
    19,588 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    1 Answer

  • Peter Lu
    Peter Lu
    10,612 Points

    My URL has the ID in it as well?

    Posted on Sep 16, 2017 by Peter Lu
    Peter Lu
    10,612 Points
    • JavaScript
    • Express Basics
    • Parameters, Query Strings, and Modularizing Routes
    • Randomize Cards

    0 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.