/    Sign up×
Community /Pin to ProfileBookmark

gameID not defined, but I see it console.log fine?

I’m working on an API server with Node.js. I get req.query.gameID from a certain URL. I also have an if statement check to see if it’s valid. It console.logs out the game ID URL parameter I typed just fine, but for some reason it’s saying it’s not defined. Like how? Here’s a screenshot:
Image![Image](https://i.ibb.co/f8RphW1/image.png)
Please help! Thanks

to post a comment

2 Comments(s)

Copy linkTweet thisAlerts:
@SempervivumFeb 28.2022 — At the last reference of gameID the preceeding `req.query.` is missing.
Copy linkTweet thisAlerts:
@BostauthorFeb 28.2022 — @Sempervivum#1642923 Oh didn't catch that, thanks!
×

Success!

Help @Bost spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.13,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...