Skip to content

Poorly explained, confusing on what to answer #7570

Open
gpressman opened this Issue · 5 comments

4 participants

@gpressman

Challenge Selecting from many options with Switch Statements has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

There's no real "bug" here, just switch statements aren't well explained and what it's looking for in terms of an answer is kind of confusing.

@N0bl3

You could use regExp to filter the answer and also ask specifically for the client/ip/whatever using a lib like express-useragent.
Add "express-useragent": "^0.2.4" to your dependencies in your package.json and npm install.
In your code require the module and use it.

This is just two ways of doing the job.
EDIT: actually the library i provided uses RegExp itself: Express-useragent Middleware for Express Framework

@N0bl3

My excuses! I was thinking of a back end challenge !

@rfprod

Adding a helpful link may help with switch statements explanation. Also, this may eliminate confusion, because task is stated quite clearly if one understands what is a switch statement. If still confused what answers are correct, press Ctrl+Enter to invoke current solution testing.

@raisedadead
Free Code Camp member

@rfprod Agreed. Would you like to put up a PR?

@rfprod

@raisedadead sorry, not now, busy building book trading club.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.