Hi. I had a look at your challenge. The original code looks like this:
a = 7;
// Only change code below this line
What you did was change the code above the line that says: ‘Only change code below this line’.
While that is not a crime it does break the code.
By changing the 2nd line, as you did, the initial value (of 7) is not assigned to “a”.
Which means, “a” is ‘undefined’. That means, it has no value.
It’s like painting a car, where, the owner of the car wants a red roof.
The car owner also wants the color of the doors to be the same as the color on the roof.
The given code says:
the car has a roof (var a;)
make the roof red (a = 7;)
the car has doors (var b;)
What they want you to do is, make the doors the same color as the roof (in this case: red) (in the code: 7)
What your code does is … make the color of the doors equal to the color of the roof. But your code has replaced the line that says- the roof is red (a = 7)
Now, the guy wanting to paint the car does not know if it should be yellow, green, white, blue, or red.
So, if you Reset your code and try again, pls leave the 1st 3 lines unchanged.
Then, add a line below the last line- the line that says, ‘Only change code below this line’
That is when you can say
b = a (make the doors same color as the roof).
By that time, the painter knows the owners preference in color, namely, red. (And the code has already assigned the value 7 to the variable “a”).
Older languages, like Pascal, used “:=”, but a lot of the modern languages just use “=” to assigna values.
Hope this helps to understand the concepts. If not, no worries, just ask for clarification and I’ll try again.