Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increment a Number with JavaScript has a misleading test case #12593

Closed
ankush2604 opened this issue Jan 18, 2017 · 6 comments
Closed

Increment a Number with JavaScript has a misleading test case #12593

ankush2604 opened this issue Jan 18, 2017 · 6 comments
Labels
first timers only Open for anyone doing contributions for first time. You do not need permission to work on these. help wanted Open for all. You do not need permission to work on these.

Comments

@ankush2604
Copy link

Challenge Increment a Number with JavaScript has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

var myVar = 87;

// Only change code below this line
myVar++;
myVar = myVar;
myVar = myVar + 0;
@OFFLlNE
Copy link

OFFLlNE commented Jan 18, 2017

@ankush2604 Thank you for reporting the issue.
Your task is just to do that "Change the code to use the ++ operator on myVar."

I think that the test "myVar = myVar should be changed" might be little misleading, this is why you have something like that in your code. Some mod might take a look and maybe explain IF we need this test-description there at all?

@raisedadead raisedadead changed the title hlp Increment a Number with JavaScript has a misleading test case Jan 18, 2017
@raisedadead
Copy link
Member

Thanks @OFFLlNE

Yes, this test case can be misleading and should be updated to

myVar = myVar + 1; should be changed.

@raisedadead raisedadead added first timers only Open for anyone doing contributions for first time. You do not need permission to work on these. help wanted Open for all. You do not need permission to work on these. tests labels Jan 18, 2017
@AngShiYa
Copy link
Contributor

Hi can I try to do this?

@dhcodes
Copy link
Contributor

dhcodes commented Jan 18, 2017

@AngShiYa Sure thing! Follow the guide for contributing at: https://github.com/FreeCodeCamp/FreeCodeCamp/blob/staging/CONTRIBUTING.md

If you run into any problems, feel free to ask for help in the Contributors Gitter chat.

@no-stack-dub-sack
Copy link
Member

Whoops - accidentally clicked the assign button!

@rahuls-19
Copy link

Just use
myVar++;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
first timers only Open for anyone doing contributions for first time. You do not need permission to work on these. help wanted Open for all. You do not need permission to work on these.
Projects
None yet
Development

No branches or pull requests

7 participants