Freecodecamp: Typo found Waypoint: Understanding Uninitialized Variables

Created on 31 Dec 2015  路  9Comments  路  Source: freeCodeCamp/freeCodeCamp

In this assignment we are given sample variables to initialize, a = 5, b = 10, c = "I am"; however, the assignment criteria states to make a = 6, b = 15 and c = "I am". The assignment grades correct based on the Instructions in the paragraph instead of the assignment criteria.

p.s. If I did this incorrectly, please accept my apology, as this is my first attempt!

Challenge Waypoint: Understanding Uninitialized Variables has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

// Initialize these three variables
var a = 5;
var b = 10;
var c = "I am a";


// Do not change code below this line

a = a + 1;
b = b + 5;
c = c + " String!";


bugfcc

All 9 comments

I'm not quite sure I understand the problem. It looks to me like it marks everything as correct if you follow the instructions and that the instructions and test cases are worded correctly. Am I missing something?

The variables requested in the instructions that are graded, ie the ones with the check marks give a positive answer that is not stated.
As you can see, the first one says:
a should be defined and have a value of 6
b should be defined and have a value of 15

However, if you look at my code, I had to enter a = 5; and b = 10; in order to get a passing answer. In my experience so far, all the criteria established by the red x must be met exactly as stated to pass, here it is not. Maybe I am missing something, but the graded criteria is not what I had to enter to pass.

Oooooh, I get it.

The criteria should probably read:

a should be defined. a should have a final value of 6
b should be defined. b should have a final value of 15

Or possibly break them into separate tests entirely. Is that what you mean?

Partly, though the grader needs to use those values to grade against. Currently those are considered incorrect.

I don't know what you mean then. Can you please spell out what you would like the tests to look like?

I have included a new image that shows the grading criteria does not match the answers provided, yet it was graded correctly!

bugfcc

Of course they are not equal. They are modified by the code below. You are given explicit instructions in the Instructions section as to what to set them to. Only when you set them that way will you get final values as described in the tests.

I see, sorry I wasted your time.

@zrsmith75 : You are brillient person. The instructions were not clear to me either. code camp maybe should consider unless it is a tricky exam questions where student should fail. i like you apologise before you a question is the only way one gets help. you are a good lad

Was this page helpful?
0 / 5 - 0 ratings