Wrong output on Scrimba interactive video lesson


// Only change code below this line
var a;
var b;
var c;
// Only change code above this line

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


Gives the output

undefined String

instead of

undefined String

Browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36

Challenge: Understanding Uninitialized Variables

Link to the challenge:

You must change your code.

a = 5;
b = 10;
c = "I am a"

I understood the lesson. The problem is the output I got from console.log function on Scrimba is wrong.

I’m not sure what you are asking. As far as I know, FreeCodeCamp didn’t make Scrimba and doesn’t have any control over what it does inside it’s editor. So what is your goal for this post?

Side note - I don’t think that the specific behavior of addition with undefined is specified by Ecmascript?

I couldn’t find a way to report this issue on Scrimba and I think this could be somewhat confusing for a beginner that likes to explore all tools inside FreeCodeCamp. Maybe if someone else gets this problem they can find this and know that it’s a problem in the Scrimba platform.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.