Not able go forward though problem is already solved i guess

Tell us what’s happening:
not able go forward though problem is already solved i guess

Your code so far
/ Setup

var a = 7;
var b = 7;

// Only change code below this line
b = a;


// Setup

var a = 7;
var b = 7;

// Only change code below this line
b = a;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36.

Challenge: Assigning the Value of One Variable to Another

Link to the challenge:

Hello,

in the automated tester it specifically says “You should not change code above the specified comment.”
because you have declared and assigned variable a at the same line. Automated tester fails.

Here is a working solution:

// Setup
var a;
a = 7;
var b;

// Only change code below this line

b=a;

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

You can post solutions that invite discussion (like asking how the solution works, or asking about certain parts of the solution). But please don’t just post your solution for the sake of sharing it.
If you post a full passing solution to a challenge and have questions about it, please surround it with [spoiler] and [/spoiler] tags on the line above and below your solution code.

1 Like

Hi @ofk8vb!

Welcome to the forum!

The goal of this lesson is to show you how to take one variable like this

var a;
a = 7;

and assign its contents to another variable like var b

So that is why you don’t need to assign 7 to var b when you can take the contents of var a and assign it to b like you did here. b = a;

This concept of assigning variables to other variables will play an important role in programming.

Hope that makes sense.

2 Likes

thank you guys, well i didn’t change code above that line it was coming like that only but after reset now it is working.