Freecodecamp: Improve instructions for 'Counting Cards'

Created on 26 Nov 2016  ·  3Comments  ·  Source: freeCodeCamp/freeCodeCamp

first timers only help wanted

Most helpful comment

@VAggrippino thanks for the issue.

...we haven't learned string to integer conversion at this point.

This isn't too much of an issue because JavaScript is dynamically untyped language. That is why you can code 3 + " Bet" and the interpreter will not yell at you for putting together different types (i.e. numeric plus string).

I understand your concern for consistency in dealing with just strings, rather than two data types, but I don't think it is too much of a concern for this challenge.

The only clarifying change to the instructions could be to add in that the input parameter card can be a numeric or string.

cc/ @FreeCodeCamp/moderators

All 3 comments

@VAggrippino thanks for the issue.

...we haven't learned string to integer conversion at this point.

This isn't too much of an issue because JavaScript is dynamically untyped language. That is why you can code 3 + " Bet" and the interpreter will not yell at you for putting together different types (i.e. numeric plus string).

I understand your concern for consistency in dealing with just strings, rather than two data types, but I don't think it is too much of a concern for this challenge.

The only clarifying change to the instructions could be to add in that the input parameter card can be a numeric or string.

cc/ @FreeCodeCamp/moderators

First-timers only

The code for this challenge is here.

The changes needs are:

You will write a card counting function. It will receive a card parameter __, which can be a number or a string,__ and increment or decrement the global count variable according to the card's value (see table).

Following CONTRIBUTING.md will help you get set up and make your first PR to FreeCodeCamp :+1:

If you get stuck, reach out to us in Contributors chat room

Good Luck!

@VAggrippino I was opening this issue up for anyone to create a PR. We would be grateful for any attempt to fix this, but if you are not up to it, someone else will create a PR. No pressure :+1:

Happy Coding!

Was this page helpful?
0 / 5 - 0 ratings