Can you help me plz

Tell us what’s happening:
Describe your issue in detail here.

Your code so far


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

Your browser information:

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

Challenge: Assigning the Value of One Variable to Another

Link to the challenge:

HI @XMNOX79 !

Welcome to the forum!

I would reset the lesson.

Here are the directions again
Assign the contents of a to variable b .

The lesson wants you to take variable a and assign it to variable b

I will use another example so you can understand the concept a little bit better.
Let’s say I wanted to assign Jessica to the variable myName

This is how I would do it.

var myName;
myName = Jessica;

You are going to do the same thing but instead of assigning Jessica to myName you are going to assign a to b

You also don’t need to declare variable b again since it is already declared for you.

You answer should only be one line of code

Hope that helps!

2 Likes

#@Profile - jwilkins.oboe - The freeCodeCamp Forum
thank you so much

1 Like

@Profile - jwilkins.oboe - The freeCodeCamp Forum
i cant ??

i just watched that challenge but i am not giving you exact answer because i want you to do it yourself
hint :
you just have to assign value of variable a to variable b

try this first , if you don’t understand please feel free to ask

I cant I swear the god I cant this is so hard

Let’s see your latest attempt.

Please reply back with your code and we can assist you from there.

When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

ok let me explain :

var a ; // here i declare variable
a = 7 ; // here is assign  7 value to a variable 

var b ; //here  i declare variable 

now you have to assign value of variable a to b
you can do this simply using assingment operator

ANSWER REDACTED BY MODERATOR

= is assignment operator here

i hope you get is , thank you!, try youself and if you again don’t get then please feel free to ask

1 Like

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

thank you for the hint :blush:

in my first post i give hint but i think user xmnox don’t get it so i describe hole thing , but next time i will keep in mind . thank you

2 Likes